Skip to content

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

Development

Successfully merging this pull request may close these issues.

gif frame deduplication on existing files without directly specifying duration results in incorrectly altered gif frame durations

2 participants