[OpenJDK 2D-Dev] [8] request for review: 7124245: [lcms] ColorConvertOp to color space CS_GRAY apparently converts orange to 244, 244, 0

Andrew Brygin andrew.brygin at oracle.com
Mon Dec 17 15:00:47 UTC 2012

Hello Jennifer and Phil,

could you please review a fix for CR 7124245?

Bug: http://bugs.sun.com/view_bug.do?bug_id=7124245
Webrev: http://cr.openjdk.java.net/~bae/7124245/8/webrev.00/

The problem with wrong colors is caused by using incorrect image
format for buffered images based on integer data buffers.
Lcms interprets image data as a sequence of bytes, so we have to
adjust data formats for such kind of images according to the
system endiannes. I.e. for INT_ARGB image we get BGRA byte sequence
on intel, and ARGB byte sequence on sparc.

Lcms always creates transforms specific for formats of processed data
(input and output). These formats can not be changed, the transform
has to be re-created instead.
So, we have to adjust input and output formats to the system endianness
before we create the transform for given input and output images.

Supplied regression test demonstrates the problem.

Please take a look.


More information about the 2d-dev mailing list