Viewing JPG's

David Fisher python at rose164.wuh.wustl.edu
Fri May 12 02:07:23 EDT 2000


What's your platform?  On my win98 computer, show() is a little finicky. 
 But if I manually go through the steps to display the image, it works 
fine.

>>> import Tkinter
>>> root = Tkinter.Tk()
>>> import Image
>>> im = Image.open('priceless1.jpg')
>>> import ImageTk
>>> imtk = ImageTk.PhotoImage(im)
>>> label = Tkinter.Label(root,image=imtk)
>>> label.pack()
>>> root.mainloop()

HTH,
David

"Klent" <klent at iislands.com> wrote in message 
news:<39146C88.E07A9AA at iislands.com>...
> I am working on  a project where I need to open a window in Tkinter. and
> display a seris of jpgs. I downloaded and installed the jpg libs and the
> Imaging libs.  but the show() command won't display the images. Is there
> an easy way to do this? Or am I on the right track even? Help would be
> greatly appriciated.
>
> Klent
>
>
> --
> http://www.python.org/mailman/listinfo/python-list  





More information about the Python-list mailing list