Do not preserve EXIFIFD tag by default when saving TIFF images by radarhere · Pull Request #8110 · python-pillow/Pillow

Conversation

@radarhere

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.

Yay295

@@ -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.

Yay295

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.

Labels