I'm very new to python, trying to use it to split the frames of a GIF into PNG images.
# 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
Is this specific to the image I'm working with or am I doing something wrong?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…