Skip to content

Only read until the offset of the next tile #8609

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

Merged
merged 2 commits into from
Mar 29, 2025

Conversation

radarhere
Copy link
Member

Resolves #8607

At the moment, ImageFile reads from files in MAXBLOCK chunks (unless pulls_fd is in use). There is no problem with this if there is only one tile. If there are multiple tiles however, that may be smaller than MAXBLOCK, then the size of the read operation can be reduced - by stopping the read operation before the next tile starts.

@hugovk hugovk merged commit 6bffa3a into python-pillow:main Mar 29, 2025
49 checks passed
@radarhere radarhere deleted the tile_read branch March 29, 2025 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance when reading TIFF file with small tiles
2 participants