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

If save_all PNG only has one frame, do not create animated image #7522

Merged
merged 1 commit into from Nov 7, 2023

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Nov 3, 2023

As an optimisation step, if saving a single frame PNG (or multiple identical frames) with save_all, do not create an APNG, but just a PNG. The resulting file is slightly smaller.

This does remove the duration from the final image, but I would suggest that single frame images don't need a duration.

@hugovk hugovk merged commit a7fe25d into python-pillow:main Nov 7, 2023
52 checks passed
@radarhere radarhere deleted the png_save_all branch November 11, 2023 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants