Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6791502

IIOException "Invalid icc profile" on jpeg after update from JDK5 to JDK6

XMLWordPrintable

    • b83
    • 6
    • b54
    • x86
    • windows_xp
    • Verified

        FULL PRODUCT VERSION :
        java version "1.6.0_07"
        Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
        Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
        ---
        java version "1.6.0_07"
        Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
        Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)


        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows XP SP3 [Version 5.1.2600]
        ---
        Linux 2.6.18.7-em64t SMP x86_64 GNU/Linux


        A DESCRIPTION OF THE PROBLEM :
        When reading a JPEG-File, an IIOException is thrown. The file can be opened by other applications, in browsers and can be read by Java when using an older JDK5:

        java version "1.5.0_08"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
        Java HotSpot(TM) Server VM (build 1.5.0_08-b03, mixed mode)

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        ImageIO.read(new File("C:\\4250252101840_b24a3a71d3116db3eead8c20753ea629.jpg"));

        The file which produces the error can be provided upon request.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        BufferedImage is created.
        ACTUAL -
        IIOException is thrown.

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        javax.imageio.IIOException: Invalid icc profile: bad sequence number
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(Native Method)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(JPEGImageReader.java:560)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly(JPEGImageReader.java:315)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(JPEGImageReader.java:437)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(JPEGImageReader.java:553)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:931)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:915)
        at javax.imageio.ImageReader.read(ImageReader.java:923)


        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        public static void main(String args[]) {
        try {
        ImageIO.read(new File("C:\\4250252101840_b24a3a71d3116db3eead8c20753ea629.jpg"));
        } catch (IOException e) {
        e.printStackTrace();
        }
        }

        ---------- END SOURCE ----------

        Release Regression From : 5
        The above release value was the last known release where this
        bug was not reproducible. Since then there has been a regression.

              bae Andrew Brygin
              igor Igor Nekrestyanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: