Skip to content

Do not load tile after seeking to zero dimension frame - #10239

Open
radarhere wants to merge 1 commit into
python-pillow:mainfrom
radarhere:zero
Open

radarhere wants to merge 1 commit into
python-pillow:mainfrom
radarhere:zero

Conversation

@radarhere

Copy link
Copy Markdown
Member

In ImageFile.load(), for a zero dimension image, we can skip loading the tile.

While this simplification is straightforward on face value, the fact that it only occurs after seeking raises the question of "Should we accept zero dimension frames, since we don't accept zero dimension images? We currently do, but should we keep doing that?"
#10080 thinks no, I believe feeling that this is inconsistent.
I think rejecting zero size images is because we want meaningful data in a file, but if meaningful data does exist in the first frame, then I'm willing to let other frames be empty.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant