Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netscape GIF extension belongs after the global color table #6211

Merged
merged 2 commits into from May 27, 2022

Conversation

radarhere
Copy link
Member

Helps #6207

When Pillow saves a GIF at the moment, the number of loops is specified as part of the local header for each frame.

It turns out this is incorrect.

https://web.archive.org/web/20140830100320/http://odur.let.rug.nl/~kleiweg/gif/netscape.html

The Netscape block must appear immediately after the global color table of the logical screen descriptor.

So this PR moves it after the global color table when saving. I've also switched to only reading the number of loops from the first frame, instead of allowing it to potentially change with each frame.

@hugovk hugovk merged commit 69f1b4a into python-pillow:main May 27, 2022
@radarhere radarhere deleted the gif_loop branch May 27, 2022 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants