Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6296893
Votes 0
Synopsis BMP Writer handles TopDown property incorrectly for some of the compression types
Category java:imageio
Reported Against 5.0 , b19
Release Fixed 7(b63)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 6828679
Submit Date 14-JUL-2005
Description
I am setting the TopDown property to true in BMPWriteParam by calling setTopDown(true). I am getting all the supported compression types and looping through them one by one and setting it to the write param. I am writing the image using each of these compression types, with topdown true using BMPImageWriter. 

I noticed that the image is actually inverted for some of the compression types such BI_RGB and BI_BITFIELDS whereas it is normal for other compression types such as BI_JPG and BI_PNG. The spec does not say anything about the dependency of TopDown on compression. I feel the behavior of TopDown must be same regardless of what compression types are used. 

This is reproducible on all platforms right from Tiger-FCS.

I have attached a sample test that would demonstrate this bug.
  xxxxx@xxxxx   2005-07-14 14:20:11 GMT
Work Around
N/A
Evaluation
The reason of problem is that  bmp image writer does not take the isTopDown flag into account during info header writing. The height of image must be negative if isTopDown flag is true, but bmp writer always write positive image height.
However, according to MSDN description, the top-down image layout is allowed only if compression type is BI_RGB or BI_BITFIELDS. Images with any other compression type must be wrote in the bottom-up layout.
Posted Date : 2005-10-02 22:32:48.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang