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

openjdk: JPEG Writer throws exception when writing a color converted image

    Details

    • Subcomponent:
      2d
    • CPU:
      x86
    • OS:
      linux_ubuntu

      Description

      I am converting a buffered image from CS_sRGB to different other color spaces using ColorConvertOp and saving the converted image in different formats using ImageIO. JPEG ImageWriter throws an exception when trying to encode some of these images obtained from below conversions -

      1. CS_sRGB to CS_GRAY
      2. CS_sRGB to CS_sRGB

      for the following buffered image types -
      1. TYPE_INT_RGB
      2. TYPE_3BYTE_BGR
      3. TYPE_INT_BGR
      4. TYPE_USHORT_565_RGB
      5. TYPE_USHORT_555_RGB
      6. TYPE_BYTE_GRAY

      Here is the exception -

      java.lang.IllegalArgumentException: Can't load standard profile: LINEAR_RGB.pf
      at java.awt.color.ICC_Profile$2.run(ICC_Profile.java:895)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.awt.color.ICC_Profile.getStandardProfile(ICC_Profile.java:888)
      at java.awt.color.ICC_Profile.getInstance(ICC_Profile.java:869)
      at java.awt.color.ColorSpace.getInstance(ColorSpace.java:330)
      at com.sun.imageio.plugins.jpeg.JPEG.isNonStandardICC(JPEG.java:234)
      at com.sun.imageio.plugins.jpeg.JPEGMetadata.<init>(JPEGMetadata.java:588)
      at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeOnThread(JPEGImageWriter.java:696)
      at com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:357)
      at javax.imageio.ImageWriter.write(ImageWriter.java:616)
      at javax.imageio.ImageIO.doWrite(ImageIO.java:1603)
      at javax.imageio.ImageIO.write(ImageIO.java:1527)
      at AutoColorConvertOpTest.doTest(AutoColorConvertOpTest.java:472)
      at AutoColorConvertOpTest.<init>(AutoColorConvertOpTest.java:253)
      at AutoColorConvertOpTest.main(AutoColorConvertOpTest.java:867)

      I reproduced it with openjdk-6 build on Ubuntu 7.10.

      I have attached a sample test and an image. Launch the test passing the image as an argument and you will see the above exception on the console.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: