-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
What did you do?
I iterated through gif frames and added copies of the frames converted to rgba to a list of the following 4 frame gif 
This was the code I used and what produced the invalid result
frames = []
while True:
frames.append(im.copy().convert('RGBA'))
try:
im.seek(im.tell() + 1)
except EOFError:
breakWhat did you expect to happen?
Expected that all the frames would look normal without them merging
What actually happened?
The last 2 images merged
as in the following pic when the expected result would be 
The second last frame was kept normal but the last frame included the second last frame merged to it
I was able to get the desired result by using the following modification of my original loop
frames = []
while True:
frames.append(im.copy().convert('RGBA'))
try:
im.seek(im.tell() + 1)
except EOFError:
frames[-1] = im.copy().convert('RGBA')
breakWhat versions of Pillow and Python are you using?
Python 3.6.4
Pillow 5.1.0
Reactions are currently unavailable