[Image-SIG] slow show
fredrik at pythonware.com
Mon Aug 22 21:53:24 CEST 2005
Victor Reijs wrote:
> I am doing an im.show() of a jpg picture (202*282 pixels) in PIL 1.1.5
> (using python 2.2), but it takes a long time before it starts up the
> windows application (some 30 seconds). I see directly a
> c:\windows\systems32\cmd.exe window but it takes around 30 seconds to
> display it after that in the already open application (in my case PSP).
PIL's "show" method simply saves the image to a temporary file and
asks Windows to display it using the default BMP viewer. if it takes
30 seconds from cmd to image, it's probably a PSP-specific problem.
if the display is part of a GUI application, I suggest using the GUI tool-
kit's image display functions (e.g. PhotoImage under Tkinter; see Image-
Tk for interface code).
if you just want a quick view under Windows, you can do
im = ...
w = ImageWin.ImageWindow(im)
w.mainloop() # this will block until the window is closed
More information about the Image-SIG