[Image-SIG] all I get is a white surface

Hrafnkell Eiríksson he@klaki.net
Wed, 19 Sep 2001 10:02:57 +0000


Hi

I just installed PIL 1.1.2 on a Win2k machine with Python 2.1.1.
I was trying to use it to view some images. All I got was a white
surface with the dimensions of the image. 

What I did was

import Tkinter
import Image
import ImageTk

root = Tkinter.Tk()
im = Image.open("c:/Temp/someimg.png")
tkim = ImageTk.PhotoImage(im)
l = Tkinter.Label(root, image=tkim)
l.pack()
root.mainloop()

Am I doing something wrong here? I've tried different images, and
all the images I can view in IE.

Btw. what is a good way to convert a string with raw image data (grayscale)
to a viewable PhotoImage. I tried using 
im.put(map(lambda v: "%02x", ord(v), data)), I gave up waiting after 10 min.


Thanks
  Hrafnkell

PS: I'm not a member of the list