发布于 2015-09-11 16:10:16 | 170 次阅读 | 评论: 0 | 来源: 网络整理
The ImageSequence module contains a wrapper class that lets you iterate over the frames of an image sequence.
from PIL import Image, ImageSequence
im = Image.open("animation.fli")
index = 1
for frame in ImageSequence.Iterator(im):
frame.save("frame%d.png" % index)
index = index + 1