[Tutor] Bitmaps and TK

Jeff Shannon jeff@ccvcorp.com
Wed Dec 4 13:58:03 2002


Ian Dickinson wrote:

>import Image
>[...]
>Image.open ("C:\\Python_projects\\CRAP\\topleftcorner.bmp")
>  
>

I'm not familiar with Tkinter and I haven't messed with PIL in quite a 
while, but... don't you need to save a reference to that image?  You're 
opening the file, and then not assigning the new image object to 
anything.  Then, later, in your canvas.create_image(), you try to use an 
"im" variable that you've never created.  Try:

im = Image.open( ... )

Jeff Shannon
Technician/Programmer
Credit International