from PIL import Image,ImageSequence img=Image.open('dive.gif') num=0 for i in ImageSequence.Iterator(img): i.save(r".\img"+str(num)+".png") num+=1