Skip to content

Add option to copy iptc data when transplanting exif information#112

Open
sandrinewitt wants to merge 1 commit intohMatoba:masterfrom
jonasundderwolf:transplant_iptc_data
Open

Add option to copy iptc data when transplanting exif information#112
sandrinewitt wants to merge 1 commit intohMatoba:masterfrom
jonasundderwolf:transplant_iptc_data

Conversation

@sandrinewitt
Copy link

Adds the possibility to include iptc data when using transplant on images #111.

Iptc data stores additional non-graphic information for images (e.g. description, keywords).

Copy link

@MRigal MRigal left a comment

Choose a reason for hiding this comment

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

Great addition!

def test_transplant_with_iptc_data(self):
piexif.transplant(INPUT_FILE1, INPUT_FILE_PEN, "transplant.jpg", include_iptc=True)
i = Image.open("transplant.jpg")
i.close()
Copy link

Choose a reason for hiding this comment

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

do you still need to open and close it?

self.assertEqual(
_common.get_iptc_seg(original_segments),
_common.get_iptc_seg(copy_segments)
)
Copy link

Choose a reason for hiding this comment

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

Maybe you could make sure that these are not equal before calling transplant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants