Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Jun 6, 2024

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.

assert reloaded.tag_v2[530] == (1, 1)
assert reloaded.tag_v2[532] == (0, 255, 128, 255, 128, 255)

def test_exif_ifd(self, tmp_path: Path) -> None:
Copy link
Contributor

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.

Copy link
Member Author

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.
Copy link
Contributor

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?

Copy link
Member Author

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.

@hugovk hugovk merged commit 41426a6 into python-pillow:main Jun 28, 2024
@radarhere radarhere deleted the exififd branch June 28, 2024 07:21
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.

save() produces an unreadable TIFF

3 participants