Skip to main content
johnrellis
Legend
September 15, 2022
Answered

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

  • September 15, 2022
  • 2 replies
  • 5413 views

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

 

This topic has been closed for replies.
Correct answer 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 replies

Thomas KnollCorrect answer
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

From what I can see, there are three separate behaviors when reading metadata from XMP.

 

1 - TIF, PNG, JPG - only read from the file not from a sidecar

2 - RAW (cr2, arw, etc) only read from xmp not from the file

3 - DNG read from whichever has the most recent modified date

 

Behaviors 1 and 2 make sense, but behavior 3 does not.

 

DNGs should receieve the same treatment as either proprietary raw formats and get edits written to a sidecar and read from a sidecar, or they should get the same treatment as open format files and have their edits written and read from the file ignoring sidecars.

 

The inconsistent behavior of the DNG is a problem and it is hard for me to see how having a special behavior for DNG is the "expected behavior."

 

If the behavior for a DNG is correct then the behavior for TIF, PNG, and JPG is incorrect. If the behavior for TIF, PNG, and JPG is correct, then the behavior for DNG is incorrect.

TheDigitalDog
Inspiring
September 24, 2022

As I stated above. I am not requesting that feature. The reason for the feature request is entirely different than this issue. It just happens to be a change that would correct the underlying design flaw. I also listed other possible solutions to the problem and not just that one.

 

I have provided detailed instructions on how to recreate the issue and reiterated numerous times why it is an issue. With the exception of the forum user who replicated the issue and created the initial bug report based on my first forum post, the issue has not been taken seriously by anyone. Instead it has been treated dismissively with comments such as:

 

quote

Yup, 8 years old and 36 votes. Now you know why the Adobe team isn't taking the request very seriously. 

...

Maybe it's time to find another software solution if this is a deal breaker for you. 

 

By @TheDigitalDog

 

or 

quoteYour proposal to always ignore sidecar XMP files for DNG format would be all these users would lose their Camera Raw settings for this DNG files.  Sorry, but I'm not trash all these users metadata just to work around a bug in some non-Adobe software.
 

 

It is true enough that the potential solution I provided would have an unacceptable downside, but the problem should not be dismissed because the user reporting it is not able to provide the correct solution. Neither should other software be blamed when the issue can be replicated with a text editor or entirely using Adobe software. I have suggested some potential solutions, not because I am commited to them being implemented in the exact way I state them, but in hopes that it would help lead to a resolution to the problem.

 

I do not wish to stop using Lightroom. I simply want the issue I have raised to be taken seriously. There are undoubtably other users who experienced the same data loss I have, and due to the nature of the issue, there are probably many who do not know that they have lost some of their edits.

As for me, I can work around the problem. I have already stopped using DNGs because of this, and I can write a script that updates the modified date on all the DNGs in a folder if the XMP was updated more recently, so I won't lose future DNG edits.

 

 

 


quote

As I stated above. I am not requesting that feature.  The reason for the feature request is entirely different than this issue.

By @FercStar

 

The feature request from 8 years ago (and 36 votes) you provided us today? 

 

I do not wish to stop using Lightroom. I simply want the issue I have raised to be taken seriously.

 

Maybe start by actually posting the feature request you desire and stop arguing with the fellow who invented the technology that might provide you the feature you haven't correctly requested yet:


My core belief is that if you're complaining about something for more than three minutes, two minutes ago you should have done something about it.“ -Caitlin Moran

 

Make a feature request; that's about all you can now do:

https://community.adobe.com/t5/photoshop-ecosystem-ideas/how-do-i-write-a-feature-request/idi-p/12384447


By @TheDigitalDog

 

Author “Color Management for Photographers" & "Photoshop CC Color Management/pluralsight"
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.

JohanElzenga
Community Expert
Community Expert
September 15, 2022

Why do your DNG files have a sidecar file in the first place? Where does it come from?

 

-- Johan W. Elzenga
Participating Frequently
September 15, 2022

They are created by another app (specifically Mylio which synchronizes my library to multiple devices).