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

Fixed bug combining GIF frame durations #6779

Merged
merged 1 commit into from Dec 13, 2022

Conversation

radarhere
Copy link
Member

Resolves #6778

Since PR #6265 started considering not just the user-provided duration for frames (duration), but also the duration from the frames themselves (im_frame.info["duration"]), the code for combining durations from multiple frames

# This frame is identical to the previous frame
if duration:
previous["encoderinfo"]["duration"] += encoderinfo["duration"]

has no longer been correct, because it only runs if the user provided durations (if duration is being used).

This fixes that. Test image was created using Pillow and ImageMagick.

@radarhere radarhere added the GIF label Dec 5, 2022
@radarhere radarhere changed the title Corrected default combined GIF frame duration Fixed bug combining GIF frame durations Dec 5, 2022
@hugovk hugovk merged commit d013fbf into python-pillow:main Dec 13, 2022
@radarhere radarhere deleted the gif_duration branch December 13, 2022 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants