Copy link to clipboard
Copied
I am doing some testing on DNG checksum processing to confirm that corrput files will be detected.
I created a DNG using the DNG Converter (from a Sony RAW) and then opened the file in a HEX editor and made a change to the file and saved it. When I then import the file into Lightroom Classic, I expected to get an error indicating that the file was corrupt as the checksum created by the DNG converter should no longer match the file's calculated checksum.
I am not, however, getting any errors on import and even if I run the Validate DNG command, the file comes back as being valid. What am I missing - editing the file in a HEX editor should cause validation to fail.
Copy link to clipboard
Copied
TBMK- A checksum is not recorded in the catalog until you use the DNG Validation check once in LrC. After that any further check of validation in LrC compares the checksum with that recorded in the Catalog.
So I guess it can only check for changes (or corruption) of image files after one validation has been done in LrC.
Your changes as made in the HEX editor are in fact 'valid' after importing the file.
Copy link to clipboard
Copied
I had never looked into DNG validation before, so I read up on it. Rob's explanation is reasonable but incorrect.
DNGs contain an MD5 hash of the raw image data in the DNG (the Color Filter Array from the sensor) DNG but nothing else. When you initially convert a raw file to DNG, the MD5 hash is computed and stored in the metadata field EXIF:NewRawImageDigest. The command Validate DNG Files recomputes the MD5 hash of the raw image data in the file and compares it to the value stored in EXIF:NewRawImageDigest.
Thus, if you change some other part of the DNG but not the raw image data, the digest remains unchanged and Valid DNG Files won't complain. This is by design -- the metadata in a DNG, including develop settings, can change all the time, whereas the precious raw image data is immutable and should never change.
See this article by Adobe's Kost:
https://jkost.com/blog/2014/06/when-do-i-convert-raw-files-to-dng.html
and a somewhat more in-depth article by Krogh (author of The DAM Book):
http://thedambook.com/dng-verification-in-lightroom-5/
Finally, you can read about NewRawImageDigest in the DNG spec:
Copy link to clipboard
Copied
Nice to know there are experts to 'put me straight'. Thanks John for the explanation- appreciated.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now