Skip to content

Commit

Permalink
Workaround default JPEG reader's Exif issues by capturing it from `In…
Browse files Browse the repository at this point in the history
…putStream`. (#108)

The default JPEG reader bundled with the JRE cannot handle JPEG images
that doesn't have a JFIF APP0 marker segment as the first one, as some JPEG
images will include Exif (APP1) as the first one. This workaround falls back
to use Exif data captured from the `InputStream` if the JPEG reader chosen by
Image I/O fails to retrieve the Exif data.
  • Loading branch information
coobird committed Dec 19, 2021
1 parent 1a6869e commit 9241010
Show file tree
Hide file tree
Showing 11 changed files with 524 additions and 17 deletions.
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,13 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down

0 comments on commit 9241010

Please sign in to comment.