[Tutor] Displaying animated gifs

Blake.Garretson@dana.com Blake.Garretson@dana.com
Mon, 23 Jul 2001 15:52:31 -0400


Is there any support from Tkinter or wxPython (wxWindows) for animated gif
files?  I just want to create a simple file viewer for gif files.  A paired
down version of my code goes something like this:

from Tkinter import *
import sys
root=Tk()
root.title("View Image")
myframe=Frame(root,colormap="new",visual='truecolor')
myframe.pack()
myimage=PhotoImage(file=sys.argv[1])
mylabel=Label(myframe,image=myimage)
mylabel.pack()
quitbutton=Button(root,text="Quit",command=root.destroy).pack(fill=X)
root.mainloop()

This works fine for regular gifs, but not for animated gifs.  There must be
a module out there somewhere that handles it, but I have yet to find it.
Any suggestions?

Thanks,
Blake Garretson