Explorar o código

Changed Color4 to System.Drawing.Color.

Daniel Kauth %!s(int64=11) %!d(string=hai) anos
pai
achega
5b52f81d05

+ 0 - 39
bbiwarg/DataSource/Color4.cs

@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace bbiwarg.DataSource
-{
-    class Color4
-    {
-        private byte a, r, g, b;
-
-        public Color4(byte a, byte r, byte g, byte b)
-        {
-            this.a = a;
-            this.r = r;
-            this.g = g;
-            this.b = b;
-        }
-
-        public byte getA()
-        {
-            return a;
-        }
-
-        public byte getR()
-        {
-            return r;
-        }
-        public byte getG()
-        {
-            return g;
-        }
-        public byte getB()
-        {
-            return b;
-        }
-    }
-}

+ 4 - 3
bbiwarg/DataSource/ColorImage.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Drawing;
 
 namespace bbiwarg.DataSource
 {
@@ -28,10 +29,10 @@ namespace bbiwarg.DataSource
             return height;
         }
 
-        public Color4 getColor(int x, int y)
+        public Color getColor(int x, int y)
         {
-            return new Color4(data[4 * (y * width + x) + 3], data[4 * (y * width + x) + 0], 
-                              data[4 * (y * width + x) + 1], data[4 * (y * width + x) + 2]);
+            return Color.FromArgb(data[4 * (y * width + x) + 3], data[4 * (y * width + x) + 0], 
+                                  data[4 * (y * width + x) + 1], data[4 * (y * width + x) + 2]);
         }
     }
 }

+ 2 - 1
bbiwarg/DataSource/ImageData.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Drawing;
 
 namespace bbiwarg.DataSource
 {
@@ -44,7 +45,7 @@ namespace bbiwarg.DataSource
             return confidenceImage.getConfidence(x, y);
         }
 
-        public Color4 getColor(int x, int y)
+        public Color getColor(int x, int y)
         {
             float u = uvImage.getU(x, y);
             float v = uvImage.getV(x, y);