-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Animated GIF frames rendered incorrectly #1742
Copy link
Copy link
Closed
Description
The attached animated .gif (bad.gif) is rendered incorrectly by PIL, with a lot of artifacts and noise in its frames (eg: bad_frame_2.gif). The same file plays correctly in web browsers and image viewers on Windows and Linux.
After uploading and re-downloading bad.gif from imgur.com, I got good.gif, which displays correctly in everything.
good.gif is slightly different in size and has slightly different color tables, but the part I'd expect to be important (transparency index and corresponding palette entry) is the same.
The only remarkable things about bad.gif that I noticed is the transparency index (0) maps to white (255,255,255) and it has NoDispose (1) as its dispose_method
Here's the test script:
from PIL import Image
image = Image.open("good.gif")
#image = Image.open("bad.gif")
#actually 18 frames long
for x in range(0, 2):
image.seek(x)
image.show()Reactions are currently unavailable



