On Thu, Jun 15, 2006 at 08:28:25PM +0200, Pavel Kosina wrote:
                        .
                        .
                        .
> How to animate an animated gif? I made some trials, using metod seek() 
> on instance of Image.open, cause I believe Tkinter can not do this 
> itself, but no success. My gif got 2 frames, and the second one is 
> always more or less black.
> 
> This script is not "animated", just want to show my approach to the problem:
> 
> from Tkinter import *
> from PIL import Image, ImageTk
> 
> hlavni=Tk()
> platno=Canvas(hlavni)
> platno.pack()
> 
> image = Image.open("myani.gif")
> frames=[]
> for frame in range(2):
>     image.seek(frame)
>     frames.append(ImageTk.PhotoImage(image))
> 
> platno.create_image(50,50, image=frames[0])
> platno.create_image(100,100, image=frames[1])
> 
> hlavni.mainloop()
                        .
                        .
                        .
1.  I wrote a gif animator for Tk:  <URL: http://wiki.tcl.tk/anigif >.
2.  While I'm busy today, maybe on the weekend I'll adapt it to
    Tkinter and comment on what you've written.

_______________________________________________
Tkinter-discuss mailing list
[email protected]
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to