aboutsummaryrefslogtreecommitdiff
path: root/generate_splash.py
diff options
context:
space:
mode:
Diffstat (limited to 'generate_splash.py')
-rw-r--r--generate_splash.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/generate_splash.py b/generate_splash.py
new file mode 100644
index 0000000..12e89ab
--- /dev/null
+++ b/generate_splash.py
@@ -0,0 +1,35 @@
+"""
+generate a splash.bin to test again
+"""
+import sys
+
+COLORS = [
+ [b"\x00", b"\x00", b"\x00"],
+ [b"\xFF", b"\x00", b"\x00"],
+ [b"\xFF", b"\xFF", b"\x00"],
+ [b"\x00", b"\xFF", b"\x00"],
+ [b"\x00", b"\xFF", b"\xFF"],
+ [b"\x00", b"\x00", b"\xFF"],
+ [b"\xFF", b"\x00", b"\xFF"],
+]
+
+def main():
+ if len(sys.argv) < 2:
+ print("{} [output]".format(sys.argv[0]))
+ return
+
+ output = sys.argv[1]
+
+ height = 400
+ width = 240
+ with open(output, "wb") as fd:
+ for h in range(height):
+ for w in range(width):
+ i = w % len(COLORS)
+
+ for x in COLORS[i]:
+ fd.write(x)
+
+
+if __name__ == "__main__":
+ main() \ No newline at end of file