You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Lucas (Jira)" <ji...@apache.org> on 2020/06/02 17:42:00 UTC

[jira] [Commented] (IMAGING-258) TiffReader.readDirectories() fails on EXIF data

    [ https://issues.apache.org/jira/browse/IMAGING-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17124128#comment-17124128 ] 

Gary Lucas commented on IMAGING-258:
------------------------------------

If anyone has a small TIFF file that exhibits this problem, it would be useful to have a test file for unit testing.   The Commons Imaging project has a bunch of TIFF files it uses for unit tests and there should be one to test EXIF tags.   The Natural Earth works just fine for development, but at 65 megabytes, it really doesn't belong in the project distribution.

> TiffReader.readDirectories() fails on EXIF data
> -----------------------------------------------
>
>                 Key: IMAGING-258
>                 URL: https://issues.apache.org/jira/browse/IMAGING-258
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: TIFF
>    Affects Versions: 1.0-alpha1
>            Reporter: Gary Lucas
>            Priority: Minor
>
> 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.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)