Trying to display a BMP image
Willie Peloquin
wpeloqui at ismi.net
Fri Mar 24 18:48:25 EST 2000
Hi,
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
following error....
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)
Thanks,
Willie
Willie Peloquin
esi - Vision Products Division
734.332.7180 phone
734.332.7077 fax
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list