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 ensuring that GIF previous frame was loaded #5386

Merged
merged 1 commit into from Apr 15, 2021

Conversation

radarhere
Copy link
Member

Resolves #4418. Takes a part of #3434

In _seek() in GifImagePlugin,

# ensure that the previous frame was loaded
if not self.im:
self.load()

self.im is only None before the first frame is loaded. After that, there is self.im - the image at the time.
So this current code only checks that the image has been loaded at some point in the past. It doesn't check that the previous frame was loaded.

Instead, self.tile can be used as an indicator if there is data waiting to be decoded.

@radarhere radarhere added the GIF label Apr 6, 2021
@radarhere radarhere added the Bug Any unexpected behavior, until confirmed feature. label Apr 6, 2021
@hugovk hugovk merged commit 0cc2943 into python-pillow:master Apr 15, 2021
@radarhere radarhere deleted the previous_frame_loaded branch April 15, 2021 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Any unexpected behavior, until confirmed feature. GIF
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong frame snapshot in GIF animated file
2 participants