-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b56
-
generic
-
generic
-
Verified
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
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
- duplicates
-
JDK-6294960 BMP Reader throws NPE when reading TYPE_BYTE_GRAY encoded by BMP Writer with BI_BITFIELDS compressn
- Closed
-
JDK-6294965 BMP Writer throws exception when writing TYPE_BYTE_BINARY image with BI_BITFIELDS compression
- Closed
-
JDK-6294984 Output img looks distorted when writing USHORT_555_RGB using BMPWriter with BI_BITFIELDS compression
- Closed