def show():
file = raw_input("What is the name of the image file? ")
picture = Image(file)
width, height = picture.size()
pix = picture.getPixels()
I am trying to write a code to display this image but this code does not provide the image. How to change my code in order to display this image?
from PIL import Image
image = Image.open('File.jpg')
image.show()
Don't forget to include
import Image
In order to show it use this :
Image.open('pathToFile').show()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With