I am trying to display an image on my GFX hat, connected to a raspberry pi 4 running 32 bit pi OS. Whenever I try to display an image some pixels are misplaced or missing
import time
from gfxhat import lcd, backlight, fonts
from PIL import Image, ImageFont, ImageDraw
backlight.set_all(240,240,240)
backlight.show()
lcd.clear()
image = Image.open("/home/raspberrypicoder/Documents/test.jpg")
lcd.contrast(45)
for x in range(128):
for y in range(64):
pixel = int(image.getpixel((x,y))[0])
print(pixel)
lcd.set_pixel(x, y, pixel)
lcd.show
The image shows, but is very messed up. The image is formatted to the correct resolution (128x64) but it still dosnt show correctly. Any ideas?