-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b10
-
generic
-
generic
-
Verified
I am running the attached test which writes a TYPE_USHORT_565_RGB buffered image using BMP Writer with all supported compression types. This test fails to read the image back from the file using ImageIO when image is encoded with BITFIELDS compression. An exception is thrown.
Here is the exception -
java.io.EOFException
at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:339)
at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:359)
at com.sun.imageio.plugins.bmp.BMPImageReader.read16Bit(BMPImageReader.java:1230)
at com.sun.imageio.plugins.bmp.BMPImageReader.read(BMPImageReader.java:821)
at javax.imageio.ImageIO.read(ImageIO.java:1422)
at javax.imageio.ImageIO.read(ImageIO.java:1282)
at BMPWriterUshort555RGBTest.<init>(BMPWriterUshort555RGBTest.java:148)
at BMPWriterUshort555RGBTest.main(BMPWriterUshort555RGBTest.java:222)
Also the output image created by BMP writer has got 2 black lines which is not there in the original image, running diagonally.
This is reproducible on all platforms atleast since 1.5.
I have attached the source image, output image and the sample test.
Here is the exception -
java.io.EOFException
at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:339)
at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:359)
at com.sun.imageio.plugins.bmp.BMPImageReader.read16Bit(BMPImageReader.java:1230)
at com.sun.imageio.plugins.bmp.BMPImageReader.read(BMPImageReader.java:821)
at javax.imageio.ImageIO.read(ImageIO.java:1422)
at javax.imageio.ImageIO.read(ImageIO.java:1282)
at BMPWriterUshort555RGBTest.<init>(BMPWriterUshort555RGBTest.java:148)
at BMPWriterUshort555RGBTest.main(BMPWriterUshort555RGBTest.java:222)
Also the output image created by BMP writer has got 2 black lines which is not there in the original image, running diagonally.
This is reproducible on all platforms atleast since 1.5.
I have attached the source image, output image and the sample test.
- relates to
-
JDK-6399660 PIT: Using subsampling with compression alters the colors for some of the image types for BMP
- Closed