Ok, even with the topic, this is a warning: total clueness incoming ;)
From Markus's adventures in PIL+Tkinter-land..
from Tkinter import *
tk = Tk()
Label(tk, text='foo').pack()
tk.mainloop()
This works. Ok. (me, a Tcl/Tk guru, snicker)
Then, we add:
import ImageTK
and change Label to have
Label(tk, image=ImageTk.PhotoImage(image)).pack()
The image is fine; image.save() produces the required output; it's RGB
image with some map data, to be precise. HOWEVER: The label has correct
size (size of the image) but no image data whatsoever. The same problem
applies to all approaches I've tried (using Canvas and putting it on one,
etc).
What am I doing incredibly stupidly now? (It _must_ be something trivial,
but..). The s/w used is PIL-1.0b1 with Python 1.5.2.
-Markus
--
"...very few phenomena can pull someone out of Deep Hack Mode, with two
noted exceptions: being struck by lightning, or worse, your *computer*
being struck by lightning."
- Matt Welsh
From Markus's adventures in PIL+Tkinter-land..
from Tkinter import *
tk = Tk()
Label(tk, text='foo').pack()
tk.mainloop()
This works. Ok. (me, a Tcl/Tk guru, snicker)
Then, we add:
import ImageTK
and change Label to have
Label(tk, image=ImageTk.PhotoImage(image)).pack()
The image is fine; image.save() produces the required output; it's RGB
image with some map data, to be precise. HOWEVER: The label has correct
size (size of the image) but no image data whatsoever. The same problem
applies to all approaches I've tried (using Canvas and putting it on one,
etc).
What am I doing incredibly stupidly now? (It _must_ be something trivial,
but..). The s/w used is PIL-1.0b1 with Python 1.5.2.
-Markus
--
"...very few phenomena can pull someone out of Deep Hack Mode, with two
noted exceptions: being struck by lightning, or worse, your *computer*
being struck by lightning."
- Matt Welsh