siox and lab

Boudewijn Rempt boud at valdyas.org
Wed Mar 29 10:34:11 CEST 2006


On Wednesday 29 March 2006 10:10, Michael Thaler wrote:
> Hi,
>
> Gimp's siox tool uses L*A*B for the internal representation of pixels. It
> basically transforms the pixels to L*A*B for its internal uses. The struct
> for a pixel looks like the following:
>
> typedef struct
> {
>   gfloat l;
>   gfloat a;
>   gfloat b;
>   gint   cardinality;
> } lab;
>
> (I think cardinality is for the siox tool).
>
> Krita on the other hand uses
>
> struct Pixel {
>         quint16 lightness;
>         quint16 a;
>         quint16 b;
>         quint16 alpha;
>     };
>
> So now I could either port the routines from gimp to convert RGB to lab or
> introduce a new  L*A*B colorspace that uses
>
> typedef struct
> {
>   gfloat l;
>   gfloat a;
>   gfloat b;
> } lab;
>
> I think the second choice would definitely be better. Does it make sense to
> write a whole colorspace or is this overkill? Does lcms support L*A*B with
> floating point numbers?

Or port the algorithm to use 16 bit integers? Or convert the lab shorts to 
float, but that would be costly. In any case: please first check the siox 
page itself, instead of just taking the code in the gimp.

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20060329/f139d38b/attachment.pgp 


More information about the kimageshop mailing list