Repository navigation
Conversation
…rame Seeking away from a loaded frame and back removed its duration and timestamp from info, and load() did not decode the frame again, so they stayed missing.
Yasser-Ameur
marked this pull request as ready for review
November 30, 2026 21:58
radarhere
force-pushed
the
fix/webp-duration-after-seeking-back
branch
3 times, most recently
from
December 1, 2026 01:28
251e11f to
530a7fa
Compare
Member
|
Using a class variable for |
radarhere
force-pushed
the
fix/webp-duration-after-seeking-back
branch
from
December 1, 2026 01:33
530a7fa to
94548c3
Compare
radarhere
enabled auto-merge (squash)
December 1, 2026 01:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request:
im.load(),im.seek(1),im.seek(0),im.load()on an animated WebP,im.infohas nodurationortimestamp, although frame 0 is loaded. GIF, APNG and AVIF images have their duration there after the same calls.load()only set them again when it decoded a frame. Seeking away and back to the frame that is already decoded skips the decode, so they stayed missing.load()now puts back the values of the decoded frame.Tests/test_file_webp_animated.pycovers the sequence above.On 13.0.0 this prints
WEBP NoneandGIF 100. On that release it was also visible when saving an animated WebP as APNG, where the first frame came out with a duration of 0.