Changed the direction of the LEDs + changed color format from RGB->BGR
[kaka/cakelight.git] / src / kaka / cakelight / Configuration.java
index 94c5ddd..2932c01 100644 (file)
@@ -70,13 +70,13 @@ public class Configuration {
             bpp = Integer.parseInt(get(prop, "video.bpp", "2"));
             switch (get(prop, "video.format", "").toUpperCase()) {
                 case "YUYV":
-                    format = Imgproc.COLOR_YUV2RGB_YUYV;
+                    format = Imgproc.COLOR_YUV2BGR_YUYV;
                     break;
                 case "YVYU":
-                    format = Imgproc.COLOR_YUV2RGB_YVYU;
+                    format = Imgproc.COLOR_YUV2BGR_YVYU;
                     break;
                 default:
-                    format = Imgproc.COLOR_YUV2RGB_UYVY;
+                    format = Imgproc.COLOR_YUV2BGR_UYVY;
             }
             crop = new CropConfiguration(prop);
         }
@@ -101,5 +101,9 @@ public class Configuration {
             cols = Integer.parseInt(get(prop, "leds.cols"));
             rows = Integer.parseInt(get(prop, "leds.rows"));
         }
+
+        public int getCount() {
+            return cols * 2 + rows * 2;
+        }
     }
 }