Injecting XMP does not display in Apple Preview or Photoshop

Started by jasonwehling, June 07, 2021, 08:13:30 PM

Previous topic - Next topic

jasonwehling

I'm injecting XMP ("inject.xmp") into a peculiar JPG ("Original.jpg"), this way:

exiftool -charset utf8 -m -overwrite_original -tagsfromfile inject.xmp -xmp original.jpg

Particularly, I'm injecting these XMP fields:


  • dc:description — Description
    dc:rights — Copyright Notice
    dc:creator — Photographer/Videographer/Author
    xmpRights:UsageTerms — Rights Usage Terms
    dc:subject — Associated Names

What's odd is that it works insofar as if I open the JPG (EmbeddedXMP.jpg) in vi, I can see the XMP block is there, with all the fields. However, in Apple Preview and Photoshop, only the xmpRights:UsageTerms field shows up (Attempt 1 Result.png).

Messing around, I tried clearing all the embedded metadata as part of the command, like this:

exiftool -All= -charset utf8 -m -overwrite_original -tagsfromfile inject.xmp -xmp original.jpg

And that works. Now I can see all the XMP fields that were injected in Apple Preview and Photoshop (Attempt 2 Result.png).

So what's the problem? I would prefer not to go nuclear and clear everything like that. I would prefer to simply inject the changed fields only, leaving anything else in the embedded metadata as-is.

Is there a way to accomplish this?

The referenced files (Original.jpg, inject.xmp, and the output: EmbeddedXMP.jpg) are available for download here:

https://library.netx.net/app/#share/request/3563c3c4-16dd-48d9-a1bb-9aabed09f436

System: replicatable on Mac and Linux.
ExifTool version: 12.23

Thanks!

Phil Harvey

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

Phil Harvey

I think I'll add a Warning if the IPTCDigest is not current.  This should help in future cases like this.

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

jasonwehling

Many thanks for your help on this! Yes, indeed, that IPTCDigest _is_ the problem. If I simply add "-IPTCDigest=" as an additional parameter, everything works as expects. Can I assume that simply clearing that hash (likely) won't cause other harm?

Phil Harvey

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