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: 6279846
Votes 74
Synopsis Pixel values are different when source and dest ColorSpace supplied to ColorConvertOp are same
Category java:classes_2d
Reported Against
Release Fixed mustang(b92)
State 10-Fix Delivered, bug
Priority: 2-High
Related Bugs 6345228
Submit Date 02-JUN-2005
Description
If the source and destination ColorSpace supplied to ColorConvertOp is the same, pixel values are different between the color converted destination and the original source. The attached test case demonstrates this problem.
  xxxxx@xxxxx   2005-06- customer  22:17:54 GMT
Work Around
N/A
Evaluation
This problem could is not only related to the images. It's also could be illustrated using more simple test:
...
        ColorSpace srcColorSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
        System.out.println("Color.RED components " + Color.RED.getRed() + 
                           ", " + Color.RED.getGreen() + ", " + 
                           Color.RED.getBlue());
        float [] red = Color.RED.getColorComponents(srcColorSpace, null);
        Color newRed = new Color(srcColorSpace, red, 1.0f);
        System.out.println("Color.RED components " + newRed.getRed() + 
                           ", " + newRed.getGreen() + ", " + 
                           newRed.getBlue());
...

Result:
Color.RED components 255, 0, 0
Color.RED components 249, 0, 5

This happens because of errors in convertations between float and internal color representation of our CMM
library.
Posted Date : 2005-08-19 14:53:54.0

Inaccuracy in sRGB color space mostly was caused by usage of the obsolete sRGB ICC profile that based on the lookup tables. Updating this profile with new one (based on tonal response curves) greatly improves precision of the color transformation. Also, to avoid unnecessary conversion (like we have in attached testcase) we are going to create fast track for ColorConverOps that consist of color spaces equal to the source and destination ones. So, there will be no color transforms just transfer of pixels.
Posted Date : 2006-06-27 16:09:18.0

Fixed by updating sRGB profile and creating fast track (without any color transforms) 
for  CololorConvertOps representing color spaces equal to the source and destination ones
Posted Date : 2006-06-28 06:50:43.0
Comments
  
  Include a link with my name & email   

Submitted On 06-JUN-2005
JuanIgnacioSanchez
This bug not only causes ColorConvertOp to work uncorrectly when both ColorModels are different, but also to calculate wrong values between different ColorModels (I haven't been able to perform a quality RGB - pYCC - RGB conversion, for example).



PLEASE NOTE: JDK6 is formerly known as Project Mustang