[IMAGE-SIG] Re: findphoto/cracker.c
Fri, 12 Dec 1997 16:24:15 +0100
> Why I can not see the image under Windows NT 4.0? or
> I have to view the image in Tkinter?
There's some hackish code in 0.3 that displays the image
if 1) you've already initialized Tkinter (by creating a Tk
instance), and 2) you've entered the Tkinter mainloop.
I don't really like that solution, so I'm probably going to
remove it in the next release...
However, displaying an image under Tkinter is pretty straight-
forward (provided you have linked Tk with the PIL extensions):
from Tkinter import *
import Image, ImageTk
root =3D Tk()
photo =3D ImageTk.PhotoImage(Image.open("foo.ppm"))
w =3D Label(root, image=3Dphoto)
You'll find more info on the ImageTk module at:
Also see the viewer.py and other sample scripts provided with
IMAGE-SIG - SIG on Image Processing with Python
send messages to: email@example.com
administrivia to: firstname.lastname@example.org