diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-04-11 09:37:25 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-04-11 09:37:25 +0200 |
commit | f7966df39849bfc0c6954d058a621da0d58335e0 (patch) | |
tree | 059d3f810a379beb93d38c190e371951ea1f136f /commandline/examples/ssd1306-getpixels | |
parent | e5f488ae91a7d7862efad5762794206b701ea25c (diff) |
examples/ssd1306: add support for 128x32 displays
Diffstat (limited to 'commandline/examples/ssd1306-getpixels')
-rwxr-xr-x | commandline/examples/ssd1306-getpixels | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/commandline/examples/ssd1306-getpixels b/commandline/examples/ssd1306-getpixels index 8527b7a..ba3e2b3 100755 --- a/commandline/examples/ssd1306-getpixels +++ b/commandline/examples/ssd1306-getpixels @@ -3,9 +3,6 @@ from PIL import Image import sys -buf_w = 128 -buf_h = 64 - def load_image(filename): im = Image.open(filename) @@ -20,6 +17,8 @@ def load_image(filename): filename = sys.argv[1] offset = int(sys.argv[2]) +buf_w = int(sys.argv[3]) +buf_h = int(sys.argv[4]) buf = load_image(filename) buf = buf[offset : offset + 128] |