More "IPTCDigest out of date confusion

Started by camner, October 17, 2024, 10:27:35 PM

Previous topic - Next topic

camner

1. I ran the following a directory of 50 files:
exiftool -if "$CurrentIPTCDigest ne $IPTCDigest" -filename DIRExifTool reported "50 files failed condition" (so all the files should have their IPTC digest up to date).

BUT, a third party app (GraphicConverter) reported some of the files as having their IPTC Digest out of date (GC uses ExifTool to assess this).

Weird.

So, I ran this on one of the files that GC reported as having the digest out of date:
exiftool -currentiptcdigest -iptcdigest (filename)The ExifTool output was:
Current IPTC Digest             : b31465c725b12340aec983f972e114e1
IPTC Digest                     : b398441c75e619d1764874d95bdc2ac3
Obviously, Current IPTC Digest and IPTC Digest are different, so the IPTC Digest IS out of date, just as GC reported.

Why does the first ExifTool command (with the -if statement) fail to report any files as having their digest out of date when extracting the Current IPTC Digest and IPTC Digest tags shows that these two tags are different?

2.  I took a folder of 25 jpg and 25 tif image files that GraphicConverter reported as having no files with their IPTCDigest out of date, and confirmed that by running exiftool -currentiptcdigest -iptcdigest on the entire folder and manually checking the output to see if Current IPTC Digest and IPTC Digest were different for any of the files, and they were not; for all files, Current IPTC Digest and IPTC Digest were equal. So, I felt confident that the digests of these files were not out of date.

I then ran this ExifTool command on the folder via a Mac Terminal shell file:
exiftool '-XMP-photoshop:DateCreated < EXIF:DateTimeOriginal' \
'-IPTC:DateCreated < EXIF:DateTimeOriginal' \
'-IPTC:TimeCreated < EXIF:DateTimeOriginal' \
'-IPTCDigest=new' (directory) -m -preserve -overwrite_original_in_place
ExifTool ran the command and output no messages.

After this command was run, Graphic Converter reported 0 of 25 jpg files and 15 out of the 25 tif files as having their IPTC Digest out of date, confirmed by ExifTool extracting Current IPTC Digest and IPTC Digest and manually comparing these values.

a.  How can the command run make some, but not all, of the tif files have their IPTC Digest out of date?

b. Shouldn't the presence of -IPTCDigest=new on the command line lead to all of the files having their IPTC Digest recalculated, so shouldn't all of the files have a current IPTC Digest after the command runs?

Phil Harvey

Quote from: camner on October 17, 2024, 10:27:35 PM1. I ran the following a directory of 50 files:
exiftool -if "$CurrentIPTCDigest ne $IPTCDigest" -filename DIR

Since you are on Mac, you must use single quotes instead of double quotes here (see my signature below), otherwise the shell will interpolate the tags as shell variables.

I'm off to bed right now so I can't respond to the rest of your questions at the moment.

- 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 ($).

camner

Quote from: Phil Harvey on October 17, 2024, 10:37:31 PM
Quote from: camner on October 17, 2024, 10:27:35 PM1. I ran the following a directory of 50 files:
exiftool -if "$CurrentIPTCDigest ne $IPTCDigest" -filename DIR

Since you are on Mac, you must use single quotes instead of double quotes here (see my signature below), otherwise the shell will interpolate the tags as shell variables.

I'm off to bed right now so I can't respond to the rest of your questions at the moment.

- Phil
Thanks for taking the time to respond before heading off.

I use single quotes when I create ExifTool commands by typing, but in this case I copied the command from a forum post, and didn't notice the double quotes.  I'm sorry to trouble you for something so simple.

camner

As further exploration, I ran exiftool '-IPTCDigest=new' $1 -m -preserve -overwrite_original_in_place after the command
exiftool '-XMP-photoshop:DateCreated < EXIF:DateTimeOriginal' \
'-IPTC:DateCreated < EXIF:DateTimeOriginal' \
'-IPTC:TimeCreated < EXIF:DateTimeOriginal' \
'-IPTCDigest=new' (directory) -m -preserve -overwrite_original_in_place
Then, neither Graphic Converter nor ExifTool reported that the IPTC digest was out of date for any file.

So, my tentative conclusion is for a reason I don't understand, the '-IPTCDigest=new' that was included in the multiline command wasn't run last, as I had expected. And since the multiline command DID change IPTC data, the IPTC digest would have changed.


Phil Harvey

Something else is happening here.  After running the multiline command, try this:

exiftool -iptcdigest -currentiptcdigest DIR

All of the digests should be the same, and these should not change with your second command.

- 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 ($).