from PIL import Image
im = Image.open('C:\Users\Leeing\Pictures\打死都不放手.gif') # 读入一个GIF文件
try:
im.save('picframe{:02d}.png'.format(im.tell()))
while True:
im.seek(im.tell()+1)
im.save('picframe{:02d}.png'.format(im.tell()))
except:
print("处理结束")

