14 Replies Latest reply on Nov 17, 2015 9:25 AM by Brett N

    Corrupted exif data in exported image

    marchyman

      I'm seeing what looks like corrupted EXIF data in exported images as reported by exiftool.  The problem happens when exporting an edited image from a Leica Q DNG file.  Exiftool reports "Warning : [minor] Possibly incorrect maker notes offsets (fix by -1196?)" followed by the following four fields

       

      Original File Name              : ~.

      Original Directory              :

      File Index                      : 3982

      Film Mode                       : ?..?.?.?.".|?

      WB RGB Levels                   : 0.951899398 3605.922052 1.068280702

       

      The Film mode contains unprintable characters.   The original DNG EXIF data reported by exiftool is

       

      Original File Name              : L1000034.DNG

      Original Directory              : 100LEICA

      File Index                      : 34

      Film Mode                       :

      WB RGB Levels                   : 0.4780578898 1 0.674571805

       

      Exported jpeg from Lightroom 6.2.1.   Same issue with 6.1.something.  No issue noticed exporting from edited CR2 or RAF files.

       

      Anyone else noticing anything similar?   Wondering if this is particular to Leica Q files.

        • 1. Re: Corrupted exif data in exported image
          rpandita Adobe Employee (Admin)

          Hi marchyman,

           

          Sorry you're having trouble with your image exports from DNG, have seen similar behavior, but it's not common. I have a few questions for you.

           

          Are you on Mac or Win? (Which OS version?)

          What file type are you exporting as? (jpg, tiff, other?)

          Does this happen with all exports from DNG files or just a specific few?

          Does it happen with DNGs from other cameras?

          Are you adding any strange or overly-long metadata that would potentially cause an issue with export? (long links?)

           

          Lastly, would you be willing to share a copy of the exported file as well as one of the original DNG files so that we can investigate? (If so, I'll send you my email address in a direct message)

           

          Get back to us with more info when you can.

          Regards,

          ~Rohit

          • 2. Re: Corrupted exif data in exported image
            marchyman Level 1

            I'm using a 27" 2012 iMac running OS X 10.11.1

             

            I'm exporting to jpeg.  I've several presets I use to create jpegs at different resolutions from edited images.  All exports of DNG files from the Leica Q show what looks like corrupted EXIF info.

             

            So far every Leica Q image exported shows the issue.  However, I've only been using the Q for a couple of days and have not exported many images.

             

            The Q is the only camera I have that generated DNG files.  I have no issues using the same presets to export jpegs from Canon CR2 or Fuji RAF raw files.

             

            I don't think I'm adding any overly long metadata.  The longest item is probably the image title or caption -- call it 10-50 characters.

             

            I'm more than happy to share a dng or anything else that can help.   Where/how do I send it or should I attach it to a post?

            • 3. Re: Corrupted exif data in exported image
              Brett N Adobe Employee

              Have you checked the original DNG file in the same way you are checking the exported JPEGs? EXIF data should never change when exporting files (unless it is being removed). Sample files would definitely help though (both a DNG and it's exported JPEG).

              • 4. Re: Corrupted exif data in exported image
                marchyman Level 1

                Yes, my original post shows the difference between the original file and the exported jpeg.

                 

                As far as sample images: HOW TO I GET THEM TO YOU?

                 

                Do I attach them to a post? I'm new to this forum and don't know how things work.  On some forums attaching a 45 MByte file is frowned upon.

                • 5. Re: Corrupted exif data in exported image
                  Brett N Adobe Employee

                  Are you a Creative Cloud subscriber? If so, you can just upload the files to your cloud space and then share the link to the file(s). Or something similar, like Dropbox, will work as well.

                  • 6. Re: Corrupted exif data in exported image
                    marchyman Level 1

                    Dropbox works for me.    OK, three files.   Why three?  Because when I checked the metadata I discovered that Lightroom changes things when I export the original so I included both the "from the camera" and the "Lightroom 6.2.1 exported" versions in addition to the jpeg with the possible munged up exif data.

                     

                    Version 1 as copied from the camera memory card: https://dl.dropboxusercontent.com/u/202211567/L1000020.DNG

                    Version 2 -- an exported "original" from within Lightroom: https://dl.dropboxusercontent.com/u/202211567/L1000020-exported.dng

                    Version 3 -- a jpeg export of the image: https://dl.dropboxusercontent.com/u/202211567/p-153141014-1000020.jpg

                     

                    Exiftool reports a warning and the following 4 fields do not seem correct.

                     

                    Warning                         : [minor] Possibly incorrect maker notes offsets (fix by -1196?)

                    Original File Name              : ~.

                    Original Directory              :

                    File Index                      : 3982

                    Film Mode                       : ?..?.?...?.".|?

                    • 7. Re: Corrupted exif data in exported image
                      Brett N Adobe Employee

                      From what I can tell, these are proprietary metadata fields for this camera. The reason you aren't seeing errors about these fields with files from your other cameras is because those cameras don't create these fields in their files. And it really seems to be just this model of camera, as I checked with other Leica cameras and still didn't see these fields appearing. So it seems that these are just fields that Lightroom isn't familiar with and isn't sure how to work with them (it essentially leaves them blank, except for some filler characters where some text is required). As Exiftool is reporting, this is a merely a warning, and not an error. Also, that warning is minor.

                       

                      Here is what Exiftool itself has to say about such situations: ExifTool FAQ.

                       

                      From what I understand reading that FAQ, these fields are essentially shortcuts that point to other information within the file. The error indicates that these shortcuts (offsets) are not pointing to the right location (MakerNotes), or something along those lines. You can force a repair by adding the -F (case sensitive) tag to Exiftool commands.

                       

                      Aside from the Exiftool warning, are you experiencing any interruptions to your workflow? Do other applications fail to work with these files or do you encounter errors?

                      • 8. Re: Corrupted exif data in exported image
                        marchyman Level 1

                        Thank you Brett. I agree with your analysis, but...

                         

                        Only the exported jpeg shows the corruption.  That tells me that Lightroom is not generating proper metadata.  I'd have expected Lightroom to either remove unknown the unknown maker notes or copy them as is.   It is doing neither.   That is something that should be addressed.   It is benign in this particular instance as I am currently do not need any of the corrupted data.  I do use exiftool in part of my work flow but it is easy enough to tell it to ignore these warnings.


                        Thanks again.

                        • 9. Re: Corrupted exif data in exported image
                          johnrellis Most Valuable Participant

                          Hmm, I downloaded the JPEG from the link you provided. 

                           

                          But when I run "exiftool -a -G" on the file, I don't see Film Mode, File Index, Original File Name, or Original Directory.  When I run "exiftool -a -G" on the DNGs, I don't see any Makernotes either.  Are you sure you uploaded the right files?

                          • 10. Re: Corrupted exif data in exported image
                            Brett N Adobe Employee

                            When I run Exiftool without any tags, I see these metadata fields, so they are in the file. And running the tag -F fills these fields with the correct information.

                            • 11. Re: Corrupted exif data in exported image
                              johnrellis Most Valuable Participant

                              I just upgraded my Exiftool from 9.93 to the latest version (10.05) and it now shows the Makernotes.

                              • 12. Re: Corrupted exif data in exported image
                                johnrellis Most Valuable Participant

                                The problem is with the Leica Q firmware, not with LR.  The firmware is inserting this tag into the EXIF metadata:

                                 

                                EXIF:MakerNoteSafety = Safe

                                 

                                According to the DNG specification, this tag indicates that MakerNote metadata can be safely copied without worrying about adjusting byte offsets inside the MakerNote data.  LR believed that declaration and copied the MakerNote metadata into the exported JPEG. 

                                 

                                But in fact (according to Exiftool), the MakerNote metadata was not safe to copy, containing internal absolute byte offsets that need adjustment whenever the MakerNote data is copied to a different location within a file.  (Because MakerNote formats are proprietary to each camera manufacturer, Lightroom doesn't make any attempt to adjust the byte offsets; Exiftool does make an attempt, but its documentation clearly warns that the attempt may fail.)

                                 

                                You can prove this to yourself:  Take a sample DNG from the camera and run this command:

                                 

                                exiftool -makernotesafety=unsafe sample.dng

                                 

                                Then import the file into LR and export it as a JPEG -- the file doesn't contain any MakerNotes.

                                • 13. Re: Corrupted exif data in exported image
                                  marchyman Level 1

                                  Thank you, John.  I'll pass this info to Leica.  Hopefully a future firmware update will address the issue.

                                  • 14. Re: Corrupted exif data in exported image
                                    Brett N Adobe Employee

                                    Indeed John, thanks for getting down to the exact details.