Mismatch XMP and sidecar text content

Started by maxbelloni, February 13, 2025, 09:50:24 PM

Previous topic - Next topic

maxbelloni

Hello,

I've found a very common error in my files content (I'm sure it has origin, as often happens, from using other DAM software before Imatch). The error is as follows:

Metadata Analyst Results. Version 2025.1.12. 2/13/2025 9:38:13 PM
File analyzed: C:\Users\mb\Pictures\Test\20090425_140727_001.jpg
Errors: 0
Warnings: 2

Warning: [Metadata] Warnings: 'IPTCDigest is not current. XMP may be out of sync'
Warning: [XMP] [ExifIFD]:UserComment and [XMP-dc]:Description (sidecar) mismatch.

The correct text is the one contained in the sidecar.
The question is: is it there some utility/mode to copy (in bulk) the content of [XMP-dc]:Description in [XMP] [ExifIFD]:UserComment, so to have them equal and get rid of the mismatch error? (I suppose that this should solve the issue)

As usual, many thanks in advance for any help! :)

Maxbelloni

Mario

#1
The IPTCDigest (checksum) will be fixed when you write back.
IMatch will also mirror the XMP description into the EXIF user comment and the legacy IPTC description during write-back.
Did you write back?

maxbelloni

Yes, I wrote back. Being the error just a warning, these files were not in the pending write-back status, so I selected them and forced the write back, but after that (and files reloaded by iMatch) nothing happened: the error is the same, nothing changed.

Maxbelloni

Mario

Please upload the file to your cloud space and post a link, or attach it here when < 5MB.
It is impossible to diagnose such problems without having the actual file to see what's wrong.

Maybe you are working with a RAW file which has both an embedded XMP record and a sidecar file and an embedded legacy IPTC record? I have no idea. I only see a small section of the ExifTool output, a small section of the Metadata Analyst output in your post. Nothing to really work with.

maxbelloni

Hi Mario,

Thanks!

Yes, they are .NEF files, with XMP sidecar. A sample containing oboth may be download from

https://www.maxbelloni.com/Ext_Img/ImatchMxb.zip

Again thanks,

Maxbelloni

Mario

I've tested your file, thanks.

This is one of these oder NEF files where Nikon software embedded legacy IPTC data.

I changed the description and wrote back. No warning about a mismatch in EXIF UserCommand and XMP description.
The XMP description in the sidecar and the EXIF UserCommend in the NEF were both updated. Also the IPTC Caption-Abstract, which mirrors XMP description. All OK.

That leaves the 'IPTCDigest is not current. XMP may be out of sync'  warning. So far, as far as I know, ExifTool has always updated the digest when writing IPTC data. But, for some reason, not for this image.

I solved this by asking ExifTool explicitly to create a new IPTC digest for this image.
I selected the image with the problem and then ran the ExifTool Command Processor with these parameters:

# im-warn
-overwrite_original_in_place
-IPTCDigest=new
-charset
filename=UTF8
{Files}

and this got rid of the warning. But it comes back when I write other metadata changes.
It seems ExifTool is unable to update the digest for some reason. Then I noticed that there is also a Photoshop IPTCDigest, so I tried

# im-warn
-overwrite_original_in_place
-IPTCDigest=new
-Photoshop:IPTCDigest=new
-charset
filename=UTF8
{Files}

same result and

# im-warn
-overwrite_original_in_place
-IPTCDigest=
-Photoshop:IPTCDigest=
-charset
filename=UTF8
{Files}

The digest warning always came back when I modified tags that are both in XMP and legacy IPTC (description, headline, ...)

I finally solved it by

1. Running the "Delete legacy IPTC data" preset in the Command Processor
2. Selecting the File and doing a force update which removes any trace of metadata from the database.

Now I can change metadata without getting this warning.
Since XMP contains everything legacy IPTC does (but without all the length limits and character set issues), this is what I've done to my old NEF files years ago.

I don't know why ExifTool has issues keeping the IPTC Digest in sync, if the PhotoShop Digest has anything to do with it or what fringe issue causes this.

I suggest you do what I did (remove legacy IPTC data and forced rescan) and move on.

maxbelloni

What a great job Mario!

Thanks a lot for your help: I'm going to apply it to all the files which have the problem...

Strange Exiftool behavior, I agree...

Maxbelloni

maxbelloni

Hi Mario,

I've just finished to fix all the mess in my images metadata, thanks to your suggestion.

In some other case I later discovered, I had too to delete the IFD0 data (!).

Anyway now it is over. Thanks!

Maxbelloni

Mario

It is not uncommon to find a bunch of files with mangled metadata when you index files taken over a long time and processed with a wide range of applications. Many entry-level image editors break maker notes, EXIF, IFDs or whatever, depending on year and version. Windows Explorer did damage in the past. Etc.

PhilHarvey

ExifTool doesn't automatically update the IPTCDigest unless you are using the Composite tags of the MWG module, and even then it is only updated if it didn't already exist or if it existed with the correct value.

If you are writing any legacy IPTC, it is probably best to also set [tt]-iptcdigest=new[/tt]

- Phil

Mario

Quote from: PhilHarvey on February 19, 2025, 02:40:58 PMExifTool doesn't automatically update the IPTCDigest unless you are using the Composite tags of the MWG module, and even then it is only updated if it didn't already exist or if it existed with the correct value.

If you are writing any legacy IPTC, it is probably best to also set [tt]-iptcdigest=new[/tt]

- Phil
Thanks, Phil. I will add that. Probably also update the photoshop Digest at the same time?

PhilHarvey

Hi Mario,

If you are talking about the Photoshop:IPTCDigest, this is the same thing as IPTCDigest (there is only one, so the group name isn't required).

There is no Photoshop:Digest tag.

- Phil

Mario