One last refactor for pigment : KoColorProfile and LCMSism

Casper Boemann cbr at boemann.dk
Tue May 1 08:02:25 CEST 2007


Full support to hide LCMSism

Casper


On Monday 30 April 2007 18:55, Cyrille Berger wrote:
> Hi,
>
> There is one last refactor I want to do for pigment (well two but they are
> related to one other).
>
> * hide LCMSism :
>  in KoColorSpace :
>     virtual quint32 colorSpaceType() = 0;
>     virtual icColorSpaceSignature colorSpaceSignature() = 0;
>  in KoColorProfile :
>     icColorSpaceSignature colorSpaceSignature() const;
>     icProfileClassSignature deviceClass() const;
>     cmsHPROFILE profile();
>
> For KoColorSpace, they are usually only use internally to KoLcmsColorSpace
> and they have no meaning for non lcms colorspaces. And for KoColorSpace,
> see my plan bellow.
>
> * KoColorProfile is used to hold some specific configuration for a lcms
> colorspace. I want to expand that to fill the need of color configuration
> for some colorspaces:
>  - YCbCr : to/from RGB convertion coefficient
>  - index images : storing the palette
>  - HDR images : store the exposure instead of the current hack of passing
> it in all functions, and it will be usefull for color convertion, because
> in a correct HDR workflow, you set the exposure of the image and then draw
> on it the color appears correct for the current exposure. Currently in 1.6
> when drawing on an HDR image we allways draw values between 0.0-1.0.
>
> Expanding would be made by inheriting, and the lcms specific functions
> would be hidden.
>
> An alternative is to add a KisColorSpaceConfiguration, but somehow I think
> it would only add burden to the API.

-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list