Skip to main content
johnrellis
Genius
September 15, 2022
해결됨

P: LrC reads metadata for a DNG from an associated sidecar

  • September 15, 2022
  • 2 답변들
  • 5387 조회

When LR imports a DNG, if there is a .xmp sidecar of the same file name, LR will incorrectly read metadata from the sidecar, but only if the date-modified of the .xmp file is newer than that of the .dng.  Similar behavior occurs with Metadata > Read Metadata From File. 

 

LR should never read metadata for a DNG from a .xmp sidecar (just as it doesn't for JPEG, TIFF, and other non-raw formats). And note that for sidecars of raw files, the sidecar is always read regardless of whether its date-modified is newer or older than the associated raw file.

 

See this thread for the original report of the problem.


Tested on LR 11.5 / Mac OS 12.4.  Steps to reproduce:

 

1. Disable the option Catalog Settings > Metadata > Automatically Write Changes Into XMP.

 

2. Download  a.xmp and a.dng into the same folder.

https://www.dropbox.com/s/n9kpqeddqtff83p/dng-xmp.2022.09.16.zip?dl=0

 

3. In Mac Terminal, do the command "touch a.dng"; on Windows, do "copy a.dng + nul a.dng".  These commands will set the date-modified of a.dng to "now", newer than a.xmp.

 

4. Import a.dng with the Add option.

 

5. Select a.dng and observe that the Metadata panel's Sidecar Files field is blank.

 

6. Observe that a.dng is black & white with no label or rating (correct).

 

7. Remove a.dng from the catalog.

 

8. In Mac Terminal, do the command "touch a.xmp"; on Windows, do "copy a.xmp + nul a.xmp".  These commands will set the date-modified of a.xmp to "now", newer than a.dng.

 

9. Import a.dng with the Add option.

 

10. Select a.dng and observe that the Metadata panel's Sidecar Files field is blank.

 

11. Observe that a.dng is color, not black & white, and it has a red label and rating = 2, indicating that LR has read metadata from a.xmp (incorrect).

 

이 주제는 답변이 닫혔습니다.
최고의 답변: Thomas Knoll

This is expected behavor as far as Adobe is concerned.  

If Mylio does not want the sidecar file to be attached to the ".DNG" file, but instead a file with a different extension but the same name, is should be including the "photoshop:SidecarForExtension" tag inside the .XMP sidecar.  If this tag exists and does not specify "DNG", then Adobe software will then ignore the sidecar when reading DNG files.

2 답변

Adobe Employee
September 21, 2022

This is expected behavor as far as Adobe is concerned.  

If Mylio does not want the sidecar file to be attached to the ".DNG" file, but instead a file with a different extension but the same name, is should be including the "photoshop:SidecarForExtension" tag inside the .XMP sidecar.  If this tag exists and does not specify "DNG", then Adobe software will then ignore the sidecar when reading DNG files.

Participating Frequently
September 21, 2022

If this is the expected behavior, why doesn't it work this way with a TIF. If you recreate the scenario and use a TIF instead of a DNG, Lightroom does not read from the XMP. It only reads from the file. The read metadata from file behavior should be consistent across all file types where the edit info is embedded in the file and not in a sidecar file.

Adobe Employee
September 22, 2022

Because TIFF format was invented before both DNG format and XMP sidecar files were invented (by me, BTW), so it was not possible to change all the existing TIFF readers in the world to read metadata from XMP sidecar files, only the embedded XMP inside the TIFF.

Participating Frequently
September 15, 2022

I often edit my photos on mulitple computers, so I have the setting "Automatically Write Changes to XMP" turned on. With proprietary raw formats this works great because it saves the edit info to an XMP sidecar, but with DNG, TIFFs, etc., it saves the edits to the file.

 

This creates a problem when the file has an XMP sidecar as well. When Lightroom reads the metadata from the file, it prefers the XMP over the DNG. This means, that it will ignore edits made to the DNG and reset all of the edits. From what I can tell, there is no option to change this.

 

I understand the Lightroom doesn't write metadata to an XMP for DNGs, but if it won't write to the XMP, why does it read from the XMP instead of the DNG? This essentially breaks mutliple device workflows using DNGs, or TIFFs. Lightroom should either allow writing to XMP sidecars for DNGs, prefer the metadata in the DNG over the XMP, give the user a choice which file to use, or merge the metadata between the two.

DdeGannes
Community Expert
Community Expert
September 16, 2022

One final thought, when you have "Automatically write metadata to XMP" selected, make sure you do not have the option to "Save to XMP set to pause. See the screen capture.

Regards, Denis: iMac 27” mid-2015, macOS 11.7.10 Big Sur; 2TB SSD, 24 GB Ram, GPU 2 GB; LrC 12.5,; Lr 6.5, PS 24.7,; ACR 15.5,; (also Laptop Win 11, ver 24H2, LrC 15.0.1, PS 27.0; ) Camera Oly OM-D E-M1.
Participating Frequently
September 17, 2022

It is not paused. The issue is not in saving to xmp or dng. It is that Lightroom reads the XMP when it should be reading the DNG.