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