Tkinter PhotoImage write method
Martin Franklin
martin.franklin at westgeo.com
Mon Jan 21 11:02:41 EST 2002
Hi all,
I am having trouble with the Tkinter PhotoImage write method.
I do this:-
pixi=CreateImage(file)
where CreateImage is a function I have written to convert a .xpm file into
a PhotoImage.
Then I do this to display this image...
imgs.append(pixi) # keep a reference...
f=Tkinter.Frame(r)
l=Tkinter.Label(f, image=pixi).pack(side='left')
So far so good. (the Image shows up) now try using pixi's write method to
convert to GIF.....
giffile=file[:-3]+'gif'
pixi.write(giffile, format='gif')
Now when I try to open this gif file (in a different script just in-case of
file.close type problem!) some of my images appear to have some of the
pixels set incorrectly....(or not at all) almost as if the gif file was
closed before they were written to.
platform is Linux (RedHat 7.1)
Python version 2.1
Tk/Tcl version 8.3.2
Hope someone can help,
Martin.
More information about the Python-list
mailing list