Richard Gitschlag wrote:
> Out of curiosity I looked through the C source for the decompose plugin and 
> noticed that the LAB
> decomp actually performs a cube root (and offset) of its input values during 
> its calculations,
> which is why a linear input gradient produces a nonlinear result.

> Perhaps there can be an additional L*a*b* color option added to the plugin 
> that incorporates the
> gamma correction into its processing?  Performing it manually after the 
> decomp does lose some
> quality in the color channels for obvious reasons, but if it could be 
> included as part of the
> plugin's execution then it would not.

How about just implementing the conversion correctly ? To convert from RGB to 
L*a*b*,
one has to convert from RGB to XYZ, then XYZ to L*a*b*. A typical working RGB 
space (like
sRGB, AdobeRGB etc.) has a gamma encoding. So RGB to XYZ removes the gamma
encoding (since XYZ is linear light), and then L*a*b* uses a 1/3 power which 
models
perceptual linearity. Of course to display an L*a*b* value you have to convert 
it
to XYZ and then to the display's RGB space. [And yes there are many
possible avenues for optimising the performance of such conversions.]

Graeme Gill.
_______________________________________________
gimp-developer-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gimp-developer-list

Reply via email to