Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

LC Classic Doesn't Recognize Corrupt DNG

New Here ,
Sep 05, 2023 Sep 05, 2023

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.

TOPICS
macOS
346
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 05, 2023 Sep 05, 2023

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.

 

Regards. My System: Windows-11, Lightroom-Classic 15.0, Photoshop 27.0, ACR 18.0, Lightroom 9.0, Lr-iOS 10.4.0, Bridge 16.0 .
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 16, 2023 Sep 16, 2023

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:

https://helpx.adobe.com/camera-raw/digital-negative.html

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 17, 2023 Sep 17, 2023
LATEST

Nice to know there are experts to 'put me straight'. Thanks John for the explanation- appreciated.

 

Regards. My System: Windows-11, Lightroom-Classic 15.0, Photoshop 27.0, ACR 18.0, Lightroom 9.0, Lr-iOS 10.4.0, Bridge 16.0 .
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines