我对 python 很陌生,试图用它将 GIF 的帧分割成 PNG 图像。
# Using this GIF: http://www.videogamesprites.net/FinalFantasy1/Party/Before/Fighter-Front.gif
from PIL import Image
im = Image.open('Fighter-Front.gif')
transparency = im.info['transparency']
im.save('test1.png', transparency=transparency)
im.seek(im.tell()+1)
transparency = im.info['transparency']
im.save('test2.png', transparency=transparency)
# First frame comes out perfect, second frame (test2.png) comes out black,
# but in the "right shape", i.e.
# http://i.stack.imgur.com/5GvzC.png
这是特定于我正在使用的图像还是我做错了什么?
谢谢!