Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Feb 28, 2022

Resolves #4513

See https://www.awaresystems.be/imaging/tiff/bigtiff.html for a documentation reference.

The test image was created with convert hopper.tif TIFF64:hopper_bigtiff.tif.

@radarhere radarhere added the TIFF label Feb 28, 2022
return self._fixup_dict(info)

def _get_head(self):
version = b"\x2B" if self.bigtiff else b"\x2A"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\x2B is 43, and \x2A is 42, as per https://www.awaresystems.be/imaging/tiff/bigtiff.html

(TiffTags.FLOAT, "f", "float"),
(TiffTags.DOUBLE, "d", "double"),
(TiffTags.IFD, "L", "long"),
(TiffTags.LONG8, "Q", "long8"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.awaresystems.be/imaging/tiff/bigtiff.html

The StripOffsets, StripByteCounts, TileOffsets, and TileByteCounts tags are allowed to have the datatype TIFF_LONG8 in BigTIFF.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Shall we add to release notes?

@hugovk hugovk merged commit 515957b into python-pillow:main Mar 11, 2022
@radarhere radarhere deleted the bigtiff branch March 11, 2022 21:07
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.

PIL cannot read BigTIFF

2 participants