-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
6
-
generic
-
generic
I am using USHORT_555_RGB Image which I am writing to a file using BMP Writer with all the supported compression types. When I set the compression type to BI_JPEG, I am getting an exception when reading back the image using BMP reader.
Here is the exception:
java.io.EOFException
at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:330)
at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:350)
at com.sun.imageio.plugins.bmp.BMPImageReader.read16Bit(BMPImageReader.java:1234)
at com.sun.imageio.plugins.bmp.BMPImageReader.read(BMPImageReader.java:804)
at javax.imageio.ImageIO.read(ImageIO.java:1400)
at javax.imageio.ImageIO.read(ImageIO.java:1286)
at BMPWriterUshort555RGBTest.<init>(BMPWriterUshort555RGBTest.java:135)
at BMPWriterUshort555RGBTest.main(BMPWriterUshort555RGBTest.java:208)
This is reproducible on all platforms since Tiger-FCS.
If this compression type is not supported for the specified image, the protected method canEncodeImage() in BMPWriter must be enhanced to add these conditions also.
I have attached the sample test and the same image. Run the test as follows:
'java BMPWriterUshort555RGBTest bmp'. You will see the above exception on the console.
###@###.### 2005-07-08 11:33:32 GMT
###@###.### 2005-07-08 13:31:03 GMT
Here is the exception:
java.io.EOFException
at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:330)
at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:350)
at com.sun.imageio.plugins.bmp.BMPImageReader.read16Bit(BMPImageReader.java:1234)
at com.sun.imageio.plugins.bmp.BMPImageReader.read(BMPImageReader.java:804)
at javax.imageio.ImageIO.read(ImageIO.java:1400)
at javax.imageio.ImageIO.read(ImageIO.java:1286)
at BMPWriterUshort555RGBTest.<init>(BMPWriterUshort555RGBTest.java:135)
at BMPWriterUshort555RGBTest.main(BMPWriterUshort555RGBTest.java:208)
This is reproducible on all platforms since Tiger-FCS.
If this compression type is not supported for the specified image, the protected method canEncodeImage() in BMPWriter must be enhanced to add these conditions also.
I have attached the sample test and the same image. Run the test as follows:
'java BMPWriterUshort555RGBTest bmp'. You will see the above exception on the console.
###@###.### 2005-07-08 11:33:32 GMT
###@###.### 2005-07-08 13:31:03 GMT
- duplicates
-
JDK-6294920 BMP Reader fails to read 3BYTE_BGR images encoded using BMP Writer with BI_JPEG compression
-
- Closed
-