[argyllcms] Re: Gamut mapping, abstract profile

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Mon, 18 Oct 2021 15:33:21 +1100

Auke Nauta wrote:

Hi,

I have a question about the gamut mapping (by colprof):
We can add a custom abstract ICC profile which is used after the gamut 
mapping.
This indeed works fine.

Yet, it would be preferable that the colour adjustments were applied to the 
source colours prior to
gamut mapping (to avoid clipping and maintain perceptual results).

this depends on what is intended. The main purpose of adding the abstract 
profile support
at the time was to allow fine tuning of the profile accuracy using refine. For 
this purpose
there is little difference as to whether the abstract profile is taken into 
account
in the gamut mapping or not.
Would it be possible to fix this behaviour?

Anything is possible in the source of course, and I guess it wouldn't be too
hard to add something like this into profile/profout.c if you take care
of all the details. The cleanest way of doing this is probably to modify
the xicc/xlut object to have an optional abstract profile attribute.
The whole implementation would then need adjusting to take this
into account - i.e. color lookup forward and backwards, gamut surface
generation, etc. - i.e. everything in xicc/xicc.h XLU_BASE_MEMBERS
as well as the icxLuLut class. This is a fair bit of work, and
plenty to test afterwards to make sure it works and that it hasn't
broken something. Rough guess would be about a weeks work for me, if
I had something to test with.

(Could I do it myself? I *do* compile from source and occasionally make some 
adjustments).

Only you can say if you feel up to this.

Cheers,
        Graeme Gill.

Other related posts: