Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Mar 17, 2025

#5919 reduced the load time for images that have consecutive tiles only differing in their offset. The test image in test_timeout() was a TIFF file, but the change was made more generally to ImageFile.

After python-pillow/docker-images#232, QEMU jobs in the docker-images repository are slower, and test_timeout() is now timing out.

This PR adds specific logic to TiffImagePlugin. Each tile has the same width and height, so if that width and height covers the image and there are no layers involved, then only the last offset is needed.

@radarhere radarhere added the TIFF label Mar 17, 2025
@radarhere radarhere marked this pull request as draft March 17, 2025 12:15
@radarhere radarhere changed the title Do not add consecutive duplicate TIFF tiles that only differ by their offset If every TIFF tile covers the image, only use the last offset Mar 17, 2025
@radarhere radarhere marked this pull request as ready for review March 17, 2025 13:21
@hugovk hugovk merged commit 039ecac into python-pillow:main Mar 18, 2025
55 checks passed
@radarhere radarhere deleted the tiff_timeout branch March 18, 2025 20:41
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.

2 participants