summaryrefslogtreecommitdiff
path: root/src/app/ssd1306-bad-apple/frames-to-cc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-04-16 20:49:36 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-04-16 20:49:36 +0200
commit42e7fdf01c3a5701bb51e93ad6c650c3dbbc5450 (patch)
tree0230d2d4e372f205f43b27a96f4c6355c1e28a37 /src/app/ssd1306-bad-apple/frames-to-cc
parentaa728fb0daeba1c4c15b2514acbbd0fadb8f9cda (diff)
ssd1306-bad-apple: support both 128x64 and 128x32 displays
Diffstat (limited to 'src/app/ssd1306-bad-apple/frames-to-cc')
-rwxr-xr-xsrc/app/ssd1306-bad-apple/frames-to-cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app/ssd1306-bad-apple/frames-to-cc b/src/app/ssd1306-bad-apple/frames-to-cc
index 0ae95ec..bcbabf7 100755
--- a/src/app/ssd1306-bad-apple/frames-to-cc
+++ b/src/app/ssd1306-bad-apple/frames-to-cc
@@ -1,11 +1,11 @@
#!/usr/bin/env python3
from PIL import Image
+import os
import sys
import zlib
-buf_w = 128
-buf_h = 64
+buf_w, buf_h = map(int, os.getenv("size", "128x64").split("x"))
def load_image(filename):
im = Image.open(filename)