Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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