Do not preserve EXIFIFD tag by default when saving TIFF images by radarhere · Pull Request #8110 · python-pillow/Pillow
Conversation
Resolves #8106
The EXIFIFD tag is 'a pointer to the Exif IFD'. However, there's no reason why the data should be located at that very same position in the image that Pillow creates.
So this PR does not preserve it by default when saving TIFF images. The user may still provide it through an encoder argument.
| @@ -686,12 +686,17 @@ def test_save_ycbcr(self, tmp_path: Path) -> None: | |||
| assert reloaded.tag_v2[532] == (0, 255, 128, 255, 128, 255) | |||
|
|
|||
| def test_exif_ifd(self, tmp_path: Path) -> None: | |||
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tmp_path parameter can be removed now.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the commit.
Comment on lines 1819 to 1820
| # SAMPLEFORMAT is determined by the image format and should not be copied | ||
| # from legacy_ifd. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add EXIFIFD to this comment?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the commit.
This 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