Fix image example rotation and resizing.

This commit is contained in:
Tony DiCola
2014-07-30 11:26:06 -07:00
parent cdd47ab583
commit e953d88a8f

View File

@@ -44,10 +44,12 @@ disp = TFT.ILI9341(DC, rst=RST, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_h
disp.begin()
# Load an image.
# Make sure the image is 320x240 pixels!
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))
# Draw the image on the display hardware.
print 'Drawing image'
disp.display(image)