diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/ledctl.iml b/.idea/ledctl.iml
new file mode 100644
index 0000000..5e764c4
--- /dev/null
+++ b/.idea/ledctl.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..70dd05d
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pixarray/pixarray.go b/pixarray/pixarray.go
index c4a839d..922678f 100644
--- a/pixarray/pixarray.go
+++ b/pixarray/pixarray.go
@@ -12,24 +12,42 @@ const (
GBR
RGB
RBG
+ GRBW
+ BRGW
+ BGRW
+ GBRW
+ RGBW
+ RBGW
)
var StringOrders map[string]int = map[string]int{
- "GRB": GRB,
- "BRG": BRG,
- "BGR": BGR,
- "GBR": GBR,
- "RGB": RGB,
- "RBG": RBG,
+ "GRB": GRB,
+ "BRG": BRG,
+ "BGR": BGR,
+ "GBR": GBR,
+ "RGB": RGB,
+ "RBG": RBG,
+ "GRBW": GRBW,
+ "BRGW": BRGW,
+ "BGRW": BGRW,
+ "GBRW": GBRW,
+ "RGBW": RGBW,
+ "RBGW": RBGW,
}
var offsets map[int][]int = map[int][]int{
- GRB: {0, 1, 2, -1},
- BRG: {2, 1, 0, -1},
- BGR: {1, 2, 0, -1},
- GBR: {0, 2, 1, -1},
- RGB: {1, 0, 2, -1},
- RBG: {2, 0, 1, -1},
+ GRB: {0, 1, 2, -1},
+ BRG: {2, 1, 0, -1},
+ BGR: {1, 2, 0, -1},
+ GBR: {0, 2, 1, -1},
+ RGB: {1, 0, 2, -1},
+ RBG: {2, 0, 1, -1},
+ GRBW: {0, 1, 2, 3},
+ BRGW: {2, 1, 0, 3},
+ BGRW: {1, 2, 0, 3},
+ GBRW: {0, 2, 1, 3},
+ RGBW: {1, 0, 2, 3},
+ RBGW: {2, 0, 1, 3},
}
func abs(i int) int {