mirror of
https://github.com/pimoroni/st7735-python.git
synced 2025-01-05 22:40:25 +03:00
Fixes image.py.
This commit is contained in:
@@ -38,7 +38,7 @@ SPI_DEVICE = 0
|
||||
# SPI_DEVICE = 0
|
||||
|
||||
# Create TFT LCD display class.
|
||||
disp = TFT.ILI9341(DC, rst=RST, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=64000000))
|
||||
disp = TFT.ILI9341(DC, rst=RST, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=4000000))
|
||||
|
||||
# Initialize display.
|
||||
disp.begin()
|
||||
@@ -48,7 +48,7 @@ print('Loading image...')
|
||||
image = Image.open('cat.jpg')
|
||||
|
||||
# Resize the image and rotate it so it's 240x320 pixels.
|
||||
image = image.rotate(90).resize((240, 320))
|
||||
image = image.rotate(90).resize((128, 160))
|
||||
|
||||
# Draw the image on the display hardware.
|
||||
print('Drawing image')
|
||||
|
||||
Reference in New Issue
Block a user