[
https://issues.apache.org/jira/browse/IMAGING-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16238960#comment-16238960
]
Bruno P. Kinoshita commented on IMAGING-198:
--------------------------------------------
Had some spare time today in a library nearby, and spent the day recapping the
JPEG format (haven't looked at it since uni). Then spent some time in the
evening debugging the code.
So far I found `jhead -v 99f.jpg` a helpful command, showing the segments
found, and displaying the metadata hierarchically. The image attached to this
issue is a JPEG/EXIF image. It contains the APP1 marker, which is parsed with
Commons Imaging TiffReader.
This reader finds the initial directory, with 16 entries. All parsed
successfully.
Then the TiffReader reads another directory. And here's where I will have to
continue investigating it later.
This next directory starts with offset 0, and the ByteSource that it has
reference is the initial ByteSource used for the first directory. This
ByteSource has 764 bytes. But this second directory has 9128 bytes. And hence
we have an exception in one of the if's that are used to prevent array out of
bounds issues.
Just need to re-read about the EXIF format, and its directories. See how TIFF
differs in regards to EXIF, directories, ordering. Could be that TIFF expects
this second directory, as after that some code is iterating subdirectories...
> Error while parsing JPEG with EXIF metadata with Imaging 1.0 (Sony DSC-R1)
> --------------------------------------------------------------------------
>
> Key: IMAGING-198
> URL: https://issues.apache.org/jira/browse/IMAGING-198
> Project: Commons Imaging
> Issue Type: Bug
> Components: Format: JPEG
> Affects Versions: 1.0
> Environment: Windows and Java 7u80
> Reporter: Samuel
> Assignee: Bruno P. Kinoshita
> Priority: Major
> Labels: EXIF, JPEG
> Attachments: 99f.jpg
>
>
> An example of a JPEG image with EXIF metadata, coming from a Sony DSC-R1
> camera, that will not be parsed with commons-imaging 1.0.
> http://imgur.com/a/fl9D9
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)