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

Do not clear GIF tile when checking number of frames #6455

Merged
merged 1 commit into from Jul 25, 2022

Conversation

radarhere
Copy link
Member

Resolves #6454

When checking the number of frames, GifImagePlugin calls _seek() with an update_image value of False. The idea is that the image does not need to be loaded, just the data read. This was added in #6077 for performance.

It makes sense then, that the tile value should also not be updated. This PR makes that change.

Without this change, the issue found a situation where the image had not been loaded, and after checking whether or not the image was animated, there was no longer a tile to load image data from.

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.

Pillow 9.2: 'NoneType' object has no attribute 'copy'
2 participants