def show():
file = raw_input("What is the name of the image file? ")
picture = Image(file)
width, height = picture.size()
pix = picture.getPixels()
Run Code Online (Sandbox Code Playgroud)
我正在尝试编写代码来显示此图像,但此代码不提供图像.如何更改我的代码才能显示此图像?
tia*_*ldt 44
import Image
image = Image.open('File.jpg')
image.show()
Run Code Online (Sandbox Code Playgroud)
eLo*_*ato 19
别忘了包括
import Image
Run Code Online (Sandbox Code Playgroud)
为了显示它使用这个:
Image.open('pathToFile').show()
Run Code Online (Sandbox Code Playgroud)