I am working on a project which involves displaying images on a 128*64 Oled display. To do this I use Pillow together with Python3.
Basically all works fine, I am able to show the images I like to display. As long as they are exactly 128*64 pixels that is.
But what I really like is have many smaller images. Say 16*16. These smaller images I would then like to write to the display on a specific X,Y location based on some input variables. So overwrite the current 16*16 pixels on that location with the 16*16 image I provide.
When I do that now I get the correct error that my image is smaller then the display size. (Full error below). Well, I know that is correct, but is there a way how I still can achieve this?
I am breaking my head about it. And I can't seem to find in the documentation or Internet.
Traceback (most recent call last):
File "show_image.py", line 37, in <module>
show('./images/1_C.png')
File "show_image.py", line 28, in show
disp.image(image)
File "/usr/local/lib/python3.6/dist-packages/Adafruit_SSD1306/SSD1306.py", line 193, in image
.format(self.width, self.height))
ValueError: Image must be same dimensions as display (128x64).