jai-imageio-core
  1. jai-imageio-core
  2. JAI_IMAGEIO_CORE-100

IndexOutOfBoundsException while reading progressive JPEG

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: milestone 1
    • Component/s: implementation
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      100

      Description

      While reading the attached JPEG, there occures the following exception:

      --------------------------------------------------
      Failed to invoke suite(): junit.framework.AssertionFailedError:
      java.lang.IndexOutOfBoundsException: imageIndex out of bounds!
      at
      com.sun.media.imageioimpl.plugins.clib.CLibImageReader.seekToImage(CLibImageReader.java:437)
      at
      com.sun.media.imageioimpl.plugins.clib.CLibImageReader.read(CLibImageReader.java:566)
      at javax.imageio.ImageReader.read(ImageReader.java:923)
      --------------------------------------------------

      The same Image is readable by the J2SE JPEG image IO reader. I think the bug
      also exists in 1.0_01. The image is a progressive JPEG, don't know if this is
      the reason.

        Activity

        Hide
        michaelr added a comment -

        Created an attachment (id=64)
        The image producing the exception.

        Show
        michaelr added a comment - Created an attachment (id=64) The image producing the exception.
        Hide
        jxc added a comment -

        It appears to be caused by the following lines in CLibJPEGImageReaderSpi.java

        150 if (byte2 == 0xC2)

        { // progressive mode, can't decode 151 iis.reset(); 152 return false; 153 }

        If I commented out those line, the attached image can be read correctly.

        Show
        jxc added a comment - It appears to be caused by the following lines in CLibJPEGImageReaderSpi.java 150 if (byte2 == 0xC2) { // progressive mode, can't decode 151 iis.reset(); 152 return false; 153 } If I commented out those line, the attached image can be read correctly.
        Hide
        jxc added a comment -

        Added "progressive" to the Summary.

        Show
        jxc added a comment - Added "progressive" to the Summary.

          People

          • Assignee:
            jai-imageio-core-issues
            Reporter:
            michaelr
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: