Skip to content

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

Merged
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:gif_tile
Jul 25, 2022
Merged

Do not clear GIF tile when checking number of frames#6455
hugovk merged 1 commit intopython-pillow:mainfrom
radarhere:gif_tile

Conversation

@radarhere
Copy link
Copy Markdown
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