Author Topic: A few more questions about the "credit" metadata  (Read 324 times)

alanterra

  • Jr. Member
  • **
  • Posts: 13
A few more questions about the "credit" metadata
« on: April 06, 2019, 02:09:48 PM »
There was a discussion about the credit metadata field here http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,9346.msg48323.html#msg48323, which helps me, but I'm still confused.

As far as I can tell there are two versions of the "credit" metadata in a file (at least, when written by Photoshop Lightroom): a "IIM" or IPTC version that is limited to 32 characters, and an "XMP-photoshop" version that is of unlimited length.

The link above tells me that I can use the flags "-a" or "-G -a" to show both versions of "credit."

My question is, how would you just display the XMP value? Or even better, how would you display the XMP value, if it exists, and the IPTC value otherwise? I thought that somehow the flag "-XMP-photoshop:all" would show this field, since the XMP "credit" field is part of the "photoshop" group, but that doesn't seem to work.

Other fields, like "city" also have this issue. Perhaps there is a general solution for this problem?

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2569
Re: A few more questions about the "credit" metadata
« Reply #1 on: April 06, 2019, 02:35:30 PM »
My question is, how would you just display the XMP value?

You add the group name to get a tag in a specific group.  You can just use
exiftool -XMP:Credit FILE
or if you need to be very specific
exiftool -XMP-photoshop:Credit FILE

Most of the time, the general group name will work and is easiest, IMO, but there are rare occasions where you would need to be specific.  For example, there are two XMP Artist tags (that I know of), XMP-tiff:Artist and XMP-xmpDM:Artist.  The XMP-tiff group is more common and exiftool gives it priority if you extract XMP:Artist, but if you need the XMP-xmpDM group specifically, you need to add the full group name.

Quote
Or even better, how would you display the XMP value, if it exists, and the IPTC value otherwise?

To do exactly that, you would probably need to create your own user defined tag.  The priority in which exiftool will write and read tags is 1) EXIF, 2) IPTC (aka IPTC-IIM or legacy), and 3) XMP.  So exiftool would normally show the IPTC value first if it exists, then the XMP.

Quote
I thought that somehow the flag "-XMP-photoshop:all" would show this field, since the XMP "credit" field is part of the "photoshop" group, but that doesn't seem to work.

That's because IPTC:Credit has priority.  See FAQ #3, 3rd paragraph.  Also see the -a (duplicates) option.
   
Quote
Other fields, like "city" also have this issue. Perhaps there is a general solution for this problem?

Same reason.  City is a tag for both IPTC and XMP.  IPTC has priority, so that is what will be displayed unless the -a option is added or it is specifically extracted with -XMP:City (or the more lengthy -XMP-photoshop:City).
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

alanterra

  • Jr. Member
  • **
  • Posts: 13
Re: A few more questions about the "credit" metadata
« Reply #2 on: April 06, 2019, 02:38:00 PM »
Thank you. That makes it much clearer.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14896
    • ExifTool Home Page
Re: A few more questions about the "credit" metadata
« Reply #3 on: April 06, 2019, 04:29:32 PM »
To do exactly that, you would probably need to create your own user defined tag.  The priority in which exiftool will write and read tags is 1) EXIF, 2) IPTC (aka IPTC-IIM or legacy), and 3) XMP.  So exiftool would normally show the IPTC value first if it exists, then the XMP.

Actually, this priority is only for writing.  For reading without the duplicates option -a enabled, generally the last one read takes priority, but there are exceptions.

You may want to look into the MWG tags which are designed to resolve conflicts between EXIF, IPTC and XMP for some of the more common tags.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

alanterra

  • Jr. Member
  • **
  • Posts: 13
Re: A few more questions about the "credit" metadata
« Reply #4 on: April 06, 2019, 04:40:23 PM »
So, if I put a long string in City (using Lightroom), the flags "-use MWG -city" or "-MWG:city" show the long (XMP) string, not the IPTC truncation.

But, this doesn't work for Credit. The flags "-use MWG -credit" shows the short version and "-MWG:credit" doesn't output anything.

Note: this is not a request for a feature, just noting the limitations of the MWG flag.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2569
Re: A few more questions about the "credit" metadata
« Reply #5 on: April 06, 2019, 04:51:17 PM »
But, this doesn't work for Credit. The flags "-use MWG -credit" shows the short version and "-MWG:credit" doesn't output anything.

That's because there isn't a MWG Credit tag.  Make sure you look at the page Phil linked to see what MWG tags actually exist.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

alanterra

  • Jr. Member
  • **
  • Posts: 13
Re: A few more questions about the "credit" metadata
« Reply #6 on: April 06, 2019, 04:52:47 PM »
That's what I meant to say, StarGeek. Sorry if it was ham-handed.