-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
5.0
-
generic
-
generic
I am writing a buffered image of type BYTE_BINARY to a file using BMP Writer. Compression Mode is set to MODE_EXPLICIT and compression type is set to BI_BITFIELDS. The image as well as compression modes are supported by the ImageWriter. When I call the write() method of the writer, I am getting an ArrayIndexOutOfBoundsException.
Here is the exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
at com.sun.imageio.plugins.bmp.BMPImageWriter.write(BMPImageWriter.java:455)
at BMPWriterByteBinaryTest.<init>(BMPWriterByteBinaryTest.java:119)
at BMPWriterByteBinaryTest.main(BMPWriterByteBinaryTest.java:209)
This is reproducible on all platforms since Tiger-FCS.
I have attached a sample test and the image. Run the sample test with any mustang build and you will see the above exception on the console.
###@###.### 2005-07-08 12:49:05 GMT
Here is the exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
at com.sun.imageio.plugins.bmp.BMPImageWriter.write(BMPImageWriter.java:455)
at BMPWriterByteBinaryTest.<init>(BMPWriterByteBinaryTest.java:119)
at BMPWriterByteBinaryTest.main(BMPWriterByteBinaryTest.java:209)
This is reproducible on all platforms since Tiger-FCS.
I have attached a sample test and the image. Run the sample test with any mustang build and you will see the above exception on the console.
###@###.### 2005-07-08 12:49:05 GMT
- duplicates
-
JDK-6297016 Output BMP image is distorted when writing TYPE_3BYTE_BGR buff image with BI_BITFIELDS compression
-
- Closed
-
- relates to
-
JDK-6294960 BMP Reader throws NPE when reading TYPE_BYTE_GRAY encoded by BMP Writer with BI_BITFIELDS compressn
-
- Closed
-