I am writing a buffered image of type TYPE_3BYTE_BGR to a file using a BMP Writer. I am setting the compression type to BI_BITFIELDS in the image write param and using this param to write the image. The output image generated is completely distorted and unusable. None of the native image applications recognize this as a valid bmp image.
The canEncodeImage() protected method in BMPWriter does not enforce any rectrictions in using this compression type with the given image, neither it throws an IOException saying this image type is not compatible with the specified compression.
This is reproducible on all platforms since Tiger-FCS.
I have attached a sample test which reproduces the bug. The 3rd image loaded onto a frame would be corrupted.
###@###.### 2005-07-14 17:35:09 GMT