summaryrefslogtreecommitdiff
path: root/commandline/examples/ssd1306-getpixels
diff options
context:
space:
mode:
Diffstat (limited to 'commandline/examples/ssd1306-getpixels')
-rwxr-xr-xcommandline/examples/ssd1306-getpixels5
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]