From 42e7fdf01c3a5701bb51e93ad6c650c3dbbc5450 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 16 Apr 2021 20:49:36 +0200 Subject: ssd1306-bad-apple: support both 128x64 and 128x32 displays --- src/app/ssd1306-bad-apple/frames-to-cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/app/ssd1306-bad-apple/frames-to-cc') 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) -- cgit v1.2.3