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

Problems with Exif and Iptc regarding Xmp sidecar files #2206

Open
pkrause1980 opened this issue Apr 12, 2022 · 1 comment
Open

Problems with Exif and Iptc regarding Xmp sidecar files #2206

pkrause1980 opened this issue Apr 12, 2022 · 1 comment
Labels

Comments

@pkrause1980
Copy link

Describe the bug

The copying of Exif and Iptc tags from/to Xmp tags for Xmp sidecar files at reading/writing leads to some strange behavior, e.g., being unable to delete certain Xmp tags.
This has the same cause as issue #1998 and #589, which seem to defer a proper solution till later. Sorry, if this is actually the same bug.

To Reproduce

Get a clean test.jpg (e.g. "convert logo: test.jpg")
exiv2 -v -M'set Iptc.Application2.Source Iptc' test.jpg
exiv2 -v -M'set Xmp.photoshop.Source Xmp' test.jpg
exiv2 -eX ex test.jpg
exiv2 -pa test.xmp
exiv2 -v -M'del Xmp.photoshop.Source' test.xmp
exiv2 -pa test.xmp

Expected behavior

The first print command does not output Iptc.Application2.Source.
The second print command outputs neither Iptc.Application2.Source nor Xmp.photoshop.Source.

Desktop (please complete the following information):

Various Linux, various exiv2 versions

Additional context

The reason for this are the convertors, i.e., the calls copyExifToXmp(exifData_, xmpData_); copyIptcToXmp(iptcData_, xmpData_); and copyXmpToIptc(xmpData_, iptcData_); copyXmpToExif(xmpData_, exifData_); in xmpsidecar.cpp.

A remove of this unconditional conversion might break some applications relying on it, e.g., "exiv2 -eX ex", but a change like this should probably be done before version 1.0 is released.
If it is not feasible to remove these automatic conversions, I'd would appreciate some runtime library option to deactivate them.

Using the library, there is a work around of calling Image::clearExifData and Image::clearIptcData for any xmp file. But I consider this:
A) Inconvenient and error prone.
B) Confusing, i.e., Exif/Iptc metadata is automatically synchronized at opening and saving with the Xmp storage location, but in between no automatic synchronization happens.
C) Ambiguous, e.g., if a save happens, should Exif values be preferred over Xmp or the other way?
D) A little confusing, as not all of Exif, Iptc, Xmp are read/stored in webp/eps files too, but no such automatic conversion happens for these files.

There is further confusion, although probably much less, by, e.g., "These are the Exif tags as defined in the Exif 2.3 standard." stated at the homepage (Metadata / Exif tags / Standard Exif tags).
Yet the linked Exif specifications do not mention Xmp. For Iptc the situation is analogous.

Many thanks!

@jim-easterbrook
Copy link
Contributor

I'm running into yet more problems with these convertors (I think). Another vote for the ability to disable them. I want to see what's in the file and nothing else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants