2

I'd like to change the loop header value of a gif animation, specifically this one:

enter image description here attribution: Gonfer at en.wikipedia

I am attempting to use the python imaging library, PIL, and have come up with the following based on another question.

import PIL as p
a=p.Image.open('Unfasor.gif')
loop = a.info['loop']
a.save('out.gif',loop=10)

This re-saves the gif but it is no longer animated.

Note the value of the loop attribute is presently 0:

>>> a.info
{'duration': 0, 'version': 'GIF89a', 'loop': 0, 'extension': ('NETSCAPE2.0', 27L)}

How can I export as a working animated gif, with a non-zero loop value? I am open to using other libraries.

Note. The reason that I am doing this is that I'd like to put the image into a powerpoint-2007 presentation and have seen suggestions that this loop value is a limiting factor.

Community
  • 1
  • 1
Lee
  • 29,398
  • 28
  • 117
  • 170

1 Answers1

1

On my machine, using PowerPoint 2011, this image works as is.

Note that it is not animated during 'edit' mode, but when in 'slide-show' mode it appears animated just as it does above.

Which version of PowerPoint are you using? and have you tried it in slide-show mode yet?

I expect the non-animation in edit mode is on purpose. I could see that getting very tedious while you were doing slide layout :)

scanny
  • 26,423
  • 5
  • 54
  • 80