Fixes image.py.

This commit is contained in:
Clement Skau
2017-03-05 15:42:13 +09:00
parent 45eea2edf4
commit 7fb910d959

View File

@@ -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')