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

TiffReader.readDirectories() fails on EXIF data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-alpha1
    • 1.0-alpha2
    • Format: TIFF
    • None

    Description

      When reading a TIFF directory that contains an EXIF sub directory, the TiffReader class throws an ImageReadException stating that "ExifOffset has incorrect type IFD". 

      This exception occurs in the TiffReader.readDirectories() call which attempts to read all IFD's (directories) in a TIFF file.  It can be avoided by calling TiffReader.readFirstDirectory().  Of course, if you do that, you will not be able to access the EXIF elements.

      This happens when accessing the TIFF element with TIFF Tag 0x8769.  I suspect that it could also happen with TIFF files containing GPS extensions, Tag 0x8825.

      I've gotten this issue with GeoTIFF files from a couple of different sources.  The one I'd recommend for testing would be the public-domain "Natural Earth Data"  medium-size Cross-blended Hypsometric Tints file at https://www.naturalearthdata.com/downloads/10m-raster-data/10m-cross-blend-hypso/

      I am not experienced with the EXIF sub-directory specification and do not yet have a good sense of what the level of effort for a fix would be.

       

       

      Attachments

        Activity

          People

            kinow Bruno P. Kinoshita
            gwlucas Gary Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h