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

PIT:JPGReader throws exception when using TYPE_CUSTOM TypeSpecifier returned by Reader.getImageTypes

XMLWordPrintable

    • b81
    • generic
    • generic
    • Verified

      I am calling JPEGImageReader.getImageTypes and it returns a type specifier with the buffered image type '0' (TYPE_CUSTOM). I am creating a buffered image out of this image type specifier and setting it as destination when reading the image. But JPEGImageReader throws an IIOException on the PIT build and image is not read.

      Here is the exception:
      vax.imageio.IIOException: Incompatible color conversion
      at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkColorConversion(JPEGImageReader.java:816)
      at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:932)
      at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:892)
      at KannanImageIOTest.<init>(KannanImageIOTest.java:55)
      at KannanImageIOTest.main(KannanImageIOTest.java:119)

      This is reproducible only on the b77 PIT build and not reporducible on Mustang-b75. This exception is thrown on Solaris as well as Win32. Hence this is a regression introduced in Mustang.

      I have attached a sample test. Execute the sample test passing the image as a command line argument. If you see the above exception on the console, the bug is reproduced.

            bae Andrew Brygin
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: