0

My gif picture is not moving in tkinter. Help please. Thank you

canvas = Canvas(width = 450, height = 450, bg = 'white')
canvas.grid(row=2, column=0,sticky = 'W')
gif = PhotoImage(file = "picture.gif")
canvas.create_image(0, 0, image = gif, anchor = NW)
mainloop()
menotyou
  • 189
  • 1
  • 1
  • 7
  • 1
    why do you think your gif should be moving? Your code isn't moving it anywhere, it's just putting it in one spot? Are you saying you have an animated gif and it isn't being animated? – Bryan Oakley Nov 03 '12 at 14:20
  • its is an animated gif and tis not being animated – menotyou Nov 04 '12 at 12:11

1 Answers1

1

Tkinter does not support animated gifs.

The tk photo image class supports creating an image from each of the sub-images of an animated gif, and with that you can create your own animation. I don't know of any examples in python, but the tcl/tk version can be seen here: http://wiki.tcl.tk/4882

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685