Warning : IPTCDigest is not current

Started by ghelfrich919, August 19, 2023, 03:29:38 PM

Previous topic - Next topic

ghelfrich919

I've been updating the metadata for photos I have to add data/GPS info to their XMP metadata.  In a recent update of 6 photos, I received the "IPTCDigest is not current" warning message shown below.  In this example, I received the warning for 3 of the 6 photos, and not the other 3. 

C:\WINDOWS\system32>(exec_path)\exiftool.12.6.4.0.exe "-XMP-exif:DateTimeOriginal<MWG:DateTimeOriginal" -P -overwrite_original_in_place c:\(directory)
Warning: IPTCDigest is not current. XMP may be out of sync - c:/(file 1).jpg
Warning: IPTCDigest is not current. XMP may be out of sync - c:/(file 1).jpg
Warning: IPTCDigest is not current. XMP may be out of sync - c:/(file 1).jpg
    1 directories scanned
    6 image files updated

I searched through the support forum and came across a post where someone was having the same issue.  https://exiftool.org/forum/index.php?topic=13273.0   This post provides a lot of info.  However, I still have a few questions.

There is a mention in this post that says this warning means there's a Photoshop:IPTCDigest tag in the file and it does not match the data in the file.  It appears this tag somehow indicates Photoshop and XMP data is in-sync.

In my case, the 3 photos where I am receiving this warning, I do have a Photoshop:IPTCDigest tag. What is meant by this tag doesn't match the data in the file?  What data is it being compared against?  Later in the same posts there is mention of File:CurrentIPTCDigest. Where or how does File:CurrentIPTCDigest fit into this issue?

From reading through this post, there appears to be 2 possible solutions.  First is to bring Photoshop and XMP into sync.  Does this mean updating XMP with Photoshop or vice versa?  Are the specific tags needing to be in-sync beteeen each known? Then use --> exiftool -IPTCDigest=new file.jpg to create a new in-sync tag.  Overall, this would seem to be the most difficult approach.

Second solution is to remove the Photoshop:IPTCDigest tag using --> exiftool -if "$IPTCDigest" -IPTCDigest= /path/to/files/.  Are there any significant downsides to this approach?
   
Any help is greatly appreciated.

Gerry

StarGeek

This post is where I go into more details on the IPTCDigest.

Quote from: ghelfrich919 on August 19, 2023, 03:29:38 PMWhat is meant by this tag doesn't match the data in the file?  What data is it being compared against?

The IPTCDigest is a MD5 hash of the data in the IPTC block.  If the data has been changed without creating a new hash, then the digest will no longer match.  In theory, a well written program will write the IPTC data and the XMP data at the same time, keeping them in sync and update the digest.  If some other program is used to edit the IPTC data but doesn't update the hash, the theory is that means that the XMP data has also not been updated, regardless of whether this is true or not.  The Metadata Working Group guidelines (see Guidelines for Handling Image Metadata) suggest that when there is a mismatch, then only the IPTC data should be read and the corresponding XMP data should be ignored.

QuoteLater in the same posts there is mention of File:CurrentIPTCDigest. Where or how does File:CurrentIPTCDigest fit into this issue?

The CurrentIPTCDigest is not embedded data.  It is a hash created from the current IPTC data.  Before the IPTCDigest is not current warning was added in version 12.27, you would have to manually compare the two tags, i.e.
exiftool -if "$IPTCDigest ne $CurrentIPTCDigest" <more options> /path/to/files/

QuoteFirst is to bring Photoshop and XMP into sync.

No, it is to bring the IPTC data and XMP data into sync.  The Photoshop tags are completely different.

QuoteDoes this mean updating XMP with Photoshop or vice versa?

Just because the IPTCDigest is not current does not mean that the data is out of sync.  They may perfectly match.  It just means that the IPTCDigest hash no longer matches and was not updated the last time it was written.

QuoteAre the specific tags needing to be in-sync beteeen each known? Then use --> exiftool -IPTCDigest=new file.jpg to create a new in-sync tag.  Overall, this would seem to be the most difficult approach.

Remember, the IPTCDigest does not do any checks to see if the IPTC data matches the XMP data.  It just means that the IPTC data no longer matches the data when the digest was last written.

The tags that correspond between each other can be found in the IPTC Photo Metadata Standard.  You can use the IPTC2XMP.args or XMP2IPTC.args files to copy between the two standards and they will update the IPTCDigest.  Personally, I have removed the IPTCDigest update from my copy of the files.  See the Args Files on GitHub.

QuoteAre there any significant downsides to this approach?

See my opinion in the first link.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

ghelfrich919

Thanks - this is all great information. 

I was able to spend time this evening going through what you wrote to get to a place where I believe I understand how IPTCDigest works and is used.  From this I was able to see I had some photos that already had the ITPCDigest tag set by the person who provided the photos. From this, I was then updating IPTC tags and then XMP and the exiftool warning was telling me the Photoshop:ITPCDigest hash no longer matched File:CurrentIPTCDigest.

I reviewed the IPTC2XMP.args or XMP2IPTC.args you mentioned, and I confirmed my IPTC and XMP sections were actually still in-sync following my updates.  I was only updating dates which I was updating in both. 

I decided to take your advice and delete the Photoshop:IPTCDigest tag using ...

exiftool -if "$IPTCDigest" -IPTCDigest= /path/to/files/
.. and problem solved.  Once again, thanks for your help.

Gery