Trying to display a BMP image
wpeloqui at ismi.net
Sat Mar 25 00:48:25 CET 2000
I am trying to load a BMP image and display it in a label. I am pretty
new to using PIL, and I have not used Python in quite a while. I will
appreciate any hints!
When I try to run the viewer.py script (Windows NT). I get the
TclError: invalid command name "PyImagingPhoto"
I made certain that the _imaging.dll is in the Python DLL directory.
I am using the following bit of code, and I am having no luck....
img = Image.open('im000001.bmp')
img.load() #tried with and without load
print 'mode = ', img.mode
print 'size = ', img.size
pi = BitmapImage(img) #or PhotoImage(img)
Label(liveRawF, image=pi).pack(side=TOP, expand=YES, fill=BOTH)
esi - Vision Products Division
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list