I noticed that most of my Lightroom 6.14 edited .jpg have this warning:
exiftool -a -G1 -s image.jpg
[ExifTool] Warning : IPTCDigest is not current. XMP may be out of sync
With such images macOS 12.3 Monterey apps like Photos.app 7.0, Preview.app and Finder preview erroneously grab the date from 'IPTC:DateCreated' & 'IPTC:TimeCreated' instead using 'ExifIFD:DateTimeOriginal' (luckily usually those dates are the same):
exiftool -a -G1 -s -time:all image.jpg
[ExifIFD] DateTimeOriginal : 2022:01:01 16:25:06
[IPTC] DateCreated : 2008:08:08
[IPTC] TimeCreated : 08:08:08+03:00
I experimented a little and it seems I can search and then move such images to a "Warning" subfolder with the following commands (files without '$Software' don't get listed unless it is separated so I could not use -p '$Directory/$FileName/$Software' which has a tidier output):
exiftool -r -q -q -fileOrder FileName -p '$Directory/$FileName' -p '$Software' -if '$ExifTool:Warning' .
exiftool '-Directory=./Warning' -if '$ExifTool:Warning' .
...and then fix them with:
exiftool -m -P -overwrite_original_in_place -IPTCDigest=new .
Another option to fix this error is to rebuild metadata:
exiftool -m -P -overwrite_original_in_place -all= -tagsfromfile @ -all:all -unsafe -icc_profile .
I wonder which approach is better?? Both fixes leave those (IMO unnecessary) IPTC dates intact.
-AllDates did not help here because it modifies only 'DateTimeOriginal', 'CreateDate' and 'ModifyDate' and leaves that IPTC datetime intact.
exiftool -m -P -overwrite_original_in_place '-AllDates<ExifIFD:DateTimeOriginal' .
Please correct and fine-tune, if necessary.
- Matti
Hi Matti,
If the IPTC is valid, updating the IPTCDigest is the right thing to do. Otherwise you have to do a bit of work to figure out what parts of the IPTC are valid and probably delete the rest.
- Phil