Color profiles and pigment

Schleimer, Ben bensch128 at yahoo.com
Tue Oct 30 03:00:39 CET 2007


--- Cyrille Berger <cberger at cberger.net> wrote:

> Hi,
> 
> One of the last remaining design issue in pigment lies around KoColorProfile. 
> The goal is to use it to set some parameters which are specific to a paint 
> device, but are essential to some color transformation (like exposure for 
> HDR, or the palette for indexed images layers). The problem is that a 
> KoColorProfile object can be shared between different KoColorSpace which can 
> be shared between different KisPaintDevice. So changing a parameter in a 
> KoColorProfile is going to have side effect. So basically, the idea is to 
> have one instance of each KoColorProfile for each paint device.
> 
> I see two ways of fixing this:
>  - separate KoColorSpace and KoColorProfile, and have only one instance of 
> KoColorSpace, with multiple instance of KoColorProfile

These one seems preferable. Maybe the flyweight pattern would be appropriate here?


Cheers
Ben


>  - the alternative is to "clone" the color space and it's profile when 
> creating the paint device
> 
> I shall add, that what can be shared between color profile (like ICC 
> cmsProfile) should be shared, no matter the final solution.
> 
> -- 
> Cyrille Berger
> _______________________________________________
> kimageshop mailing list
> kimageshop at kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop
> 





More information about the kimageshop mailing list