Allow saving as BigTIFF by radarhere · Pull Request #8642 · python-pillow/Pillow
Conversation
Resolves #4669
Adds a keyword argument to allow TIFF images to be saved as BigTIFF - im.save("out.tiff", big_tiff=True)
| def __init__( | ||
| self, | ||
| ifh: bytes = b"II\052\0\0\0\0\0", | ||
| ifh: bytes = b"II\x2A\x00\x00\x00\x00\x00", |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same, I'm just changing it to the form seen elsewhere in this file.
| ifh = self._prefix + self._pack("H", 43 if self._bigtiff else 42) | ||
| if self._bigtiff: | ||
| ifh += self._pack("HH", 8, 0) | ||
| ifh += self._pack("Q", 16) if self._bigtiff else self._pack("L", 8) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| .. versionadded:: 8.4.0 | ||
|
|
||
| **bigtiff** |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest adding an underscore to the public API for readability (and in the code):
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, done.
This was referenced
Dec 31, 2024This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters