[Image-SIG] Something other than .show()

kevin@cazabon.com kevin at cazabon.com
Sat Jul 2 10:31:49 CEST 2005

You can write your own Tkinter widget pretty easily...

(untested pseudocode)

import Image, ImageTk, Tkinter

def show2(imgFile):
    im = Image.open(imgFile)
    window = Tkinter.Tk()
    window.tkIm = ImageTk.PhotoImage(im)
    window.label = Tkinter.Label(window, image=window.tkIm)
    return window

x = show2("c:\\temp\test.tif")

(I make the label and tkIm as attributes of the window class, so that a
reference is held... otherwise garbage collection makes them go away)


----- Original Message ----- 
From: "Joseph Quigley" <cpu.crazy at gmail.com>
To: <image-sig at python.org>
Sent: Saturday, July 02, 2005 4:38 AM
Subject: [Image-SIG] Something other than .show()

> What else can I use besides .show() to display the image? I don't mind
> xv but on Windows it takes forever to load the picture. Is there an
> alternative? I found the PIL handbook but I can't find anything other
> than .show()
> Thanks,
>  Joe
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig

More information about the Image-SIG mailing list