hkus10 hkus10 - 2 years ago 124
Python Question

How to display a jpg file in Python?

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?

Answer Source
import Image

image ='File.jpg')
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download