Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-221

updateExifMetadataLossless restructures meta data (and problems with Maker Notes)

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 1.0.0-alpha6
    • None
    • None

    Description

      ExifRewriter's updateExifMetadataLossless method causes the meta data of the JPEG to be completely reordered after writing. This, in itself, might not be a big concern, but it's a bit unexpected when the method is named "lossless". More worryingly, I also find problems are introduced wrt. the Maker Notes tag (odd offset). 

      I've produced an example of the problem in the attached JPEG file, using ExifTool to validate/analyze the images before and after. The image is taken by a Sony Xperia Z5 phone, and the "original.JPG" validates OK. After modifying the contents of the UserComments tag (value: "Test") the modified image produces a warning:

      Verifying the attached photo using ExifTool gives the following output:
      $ ./exiftool(-k).exe -validate -warning -a ../test.JPG
      – press RETURN –
       
      Validate                        : 1 Warning (all minor)
      Warning                         : [minor] Possibly incorrect maker notes offsets (fix by -628?)
       
      Using ExifTool's -htmldump option, it is easy to see how the meta data has been affected.

      Attachments

        1. original.JPG
          3.25 MB
          Joakim Knudsen
        2. test.JPG
          3.25 MB
          Joakim Knudsen
        3. test.html
          66 kB
          Joakim Knudsen
        4. original.html
          64 kB
          Joakim Knudsen
        5. mine.JPG
          3.25 MB
          Bruno P. Kinoshita
        6. mine.JPG.html
          63 kB
          Bruno P. Kinoshita
        7. mine-original.JPG
          3.25 MB
          Bruno P. Kinoshita
        8. mine-metadata.JPG
          3.25 MB
          Bruno P. Kinoshita
        9. mine-gps.JPG
          3.25 MB
          Bruno P. Kinoshita
        10. tagsmissing.png
          65 kB
          Joakim Knudsen

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            kinow Bruno P. Kinoshita
            joakimk Joakim Knudsen

            Dates

              Created:
              Updated:

              Slack

                Issue deployment