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

Simple Exif XPTitle corrupted.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Not A Problem
    • 1.0-alpha2
    • None
    • None
    • None

    Description

      I have a small input JPEG image containing no metadata sections whatsoever. I use Apache Commons Imaging 1.0-alpha2 to add two simple Exif IFD0 properties using ExifRewriter().updateExifMetadataLossy().

      • XPTitle (0x9C9B): "Gate and Turret"
      • Copyright (33432, 0x8298): "Copyright © 2009 Garret Wilson"

      Here is a simplified excerpt of the code:

      TagInfoAscii EXIF_XP_TITLE_TAG_INFO = new TagInfoAscii("XPTitle", 0x9C9B, -1, TiffDirectoryType.EXIF_DIRECTORY_IFD0); //XPTitle (0x9C9B)
      TagInfoAscii EXIF_COPYRIGHT_TAG_INFO = new TagInfoAscii("Copyright", 0x8298, -1, TiffDirectoryType.EXIF_DIRECTORY_IFD0); //Copyright (33432, 0x8298)
      …
      TiffOutputSet tiffOutputSet = new TiffOutputSet();
      TiffOutputDirectory exifDirectory = tiffOutputSet.getOrCreateRootDirectory();
      exifDirectory.add(EXIF_XP_TITLE_TAG_INFO, "Gate and Turret");
      exifDirectory.add(EXIF_COPYRIGHT_TAG_INFO, "Copyright © 2009 Garret Wilson");
      …
      new ExifRewriter().updateExifMetadataLossy(byteSource, outputStream, tiffOutputSet);
      

      Using ExifTool 12.16 (via ExifToolGUI, the Copyright value is stored correctly but the XPTitle is stored as "慇整愠摮吠牵敲t". Metadata++ 1.22.14 also shows the same corrupted value.

      This is disheartening, as this is nearly the most simple test case possible.

      (Note that IrfanView 4.54 can read the XPTitle just fine! Nevertheless ExifTool is the gold standard for image metadata reading, and is confirmed by Metadata++. Having an image the metadata of which cannot be read in ExifTool is a show-stopper.)

      I'm will attach the test case image to this ticket.

      Attachments

        1. gate-turret-exif-bad-title.jpg
          67 kB
          Garret Wilson

        Activity

          People

            Unassigned Unassigned
            garretwilson Garret Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: