[OpenJDK 2D-Dev] Missing colour profiles
Andrew Haley
aph at redhat.com
Thu Apr 10 08:56:36 UTC 2008
Alexey Ushakov wrote:
> Hello Andrew,
>
>> One final thought: we could implement some of these standard colour
>> spaces
>> by subclassing ColorSpace directly without the use of any underlying
>> colour profile. This would be more accurate than lcms in many cases, and
>> might even be faster in some.
>>
> There is a drawback of such approach. The color spaces implemented
> directly couldn't be effectively used in ColorConvertOp operation with
> buffered images. Because it's impossible to link such transforms with
> icc ones (our default sRGB color space among them). So, the color
> transformation would end up with per-pixel color transformation of the
> whole image. Which is unacceptable slow.
Well, we could add a new case to ColorConvertOp's constructor, like
if (cspace instanceof ICC_ColorSpace) {
...
}
else if (cspace instanceof DirectColorSpace) ...
> Also, there could be some problems with backward compatibility
> concerning ColorConvertOp. Because of ColorConvertOp(ICC_Profile[]
> profiles, RenderingHints hints) constructor. Someone could use it
> following way:
>
> ColorConvertOp(new ICC_Profile[]
> {((ICC_ColorSpace)ColorSpace.getInstance(ColorSpace.CS_PYCC).)getProfile()},
> null)
Ah, okay. That's rather dubious code, but people do stuff like that. :-)
Just idly speculating,
Andrew.
More information about the 2d-dev
mailing list