[argyllcms] Re: Issues with generating a self-cancelling profile

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Mon, 29 Jul 2013 15:12:54 +1000

Etienne Dechamps wrote:
> I'm currently generating some test profiles for testing color-managed systems:
> http://forum.doom9.org/showthread.php?p=1638446#post1638446
> 
> I would like to generate a "self-cancelling" test profile, and by that I 
> mean, a RGB
> device test profile that contains video card gamma tables and profiling 
> information such
> that the calibration and profiling information cancel each other out, 
> resulting in a
> "no-op" (i.e. sRGB) profile.

It's not clear what you are attempting. A device profile can never be a noop, 
because
it transforms between two different types of spaces :- device space and PCS 
space.

You can create a noop device link easily enough, e.g.:

        collink sRGB.icm sRGB.icm noop.icm

> I tried the following procedure:
> 
>   targen -d3 strangecancel
>   fakeread -k strange.cal sRGB.icm strangecancel
>   colprof strangecancel
>   collink sRGB.icm strangecancel.icm srgb2strangecancel.icm
>   cctiff srgb2strangecancel.icm sample.jpg sample.strangecancel.jpg
> 
> In the end I expect sample.strangecancel.jpg to look identical (or at least 
> very similar)
> to sample.jpg.

Why would you expect that ? You applied strange.cal to the sRGB characteristic,
so of course it is not the inverse of sRGB. So the overall effect should be 
quite
close to just applying inverse strange.cal:

        cctiff -db strange.cal sample.jpg sample.strange.jpg
        
> However, if I try to use applycal after
> colprof, or if I try to apply strange.cal in cctiff, I end up with the 
> opposite (blueish
> tint as if only the calibration had been applied but no profiling).

Right, because the profile is create from the forward transformation of 
device->PCS,
and the calibration curves are device per channel curves, but you linked sRGB 
to the
profile, which is an overall dev -> PCS -> PCS -> dev transformation, so you 
are using
the backwards transformation of your strangecancel.icm, so naturally you get
the inverse of the calibration being applied.

Graeme Gill.


Other related posts: