Python : seek() function from Pillow not working properly

36 Views Asked by At

I am trying to extract all images from a 14 frames GIF of dancing characters When I try using the seek() function from Pillow to go to the next frame and use show() on the object it always show me the same frame. Here is my code :

image = Image.open(f"./characters/{key.decode('utf-8')}.gif")

image.show()
image.seek(1)
image.show()

Here are the results when I input the character 'a' Both showed frames for letter A. And here is the full GIF Full 'A' GIF

I tried using seek for every all of the 14 frames (0 to 13) and it still showed the same image.

I do not understand why it is not working, all help would be gladly appreciated ! If it is relevant I am developing using PyCharm

0

There are 0 best solutions below