JDK-8023565 : JPG causes javax.imageio.IIOException: ICC APP2 encoutered without prior JFIF!
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.imageio
  • Affected Version: 8-pool
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-08-22
  • Updated: 2014-02-12
  • Resolved: 2013-09-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
6u71Fixed 7u60Fixed 8 b110Fixed
Related Reports
Relates :  
Trying to read a certain JPEG image which is stored with CMYK color profile throws an IIOException when trying to get the image metadata of the (first and only) image in the file.

Apparently the 'old' com.sun.image.codec.jpeg.JPEGImageDecoder is able to read that sample image. But to me this is no solution because it is not portable enough.

Added JPEGMetadataTest.java file Verified on jdk7u45b03 ��� test failed with javax.imageio.IIOException: ICC APP2 encountered without prior JFIF! Verified on jdk8b112 ��� test successful Environment: Local VirtualBox VM with Ubuntu 12.04 x32 Linux virt 3.8.0-32-generic #47~precise1-Ubuntu SMP Wed Oct 2 16:22:28 UTC 2013 i686 i686 i386 GNU/Linux

Sample image which throws exception