【发布时间】:2014-10-02 01:55:44
【问题描述】:
我想更改 gif 动画的循环标头值,特别是 this one:
attribution: Gonfer at en.wikipedia
我正在尝试使用python imaging library, PIL,并根据another question 提出以下内容。
import PIL as p
a=p.Image.open('Unfasor.gif')
loop = a.info['loop']
a.save('out.gif',loop=10)
这会重新保存 gif,但不再是动画。
注意loop属性的值目前为0:
>>> a.info
{'duration': 0, 'version': 'GIF89a', 'loop': 0, 'extension': ('NETSCAPE2.0', 27L)}
如何导出为具有非零循环值的工作动画 gif?我愿意使用其他库。
注意。我这样做的原因是I'd like to put the image into a powerpoint-2007 presentation 和seen suggestions that this loop value is a limiting factor。
【问题讨论】:
标签: python powerpoint python-imaging-library animated-gif