[argyllcms] Re: dispwin vs xcalib loading LUT

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Tue, 02 Jan 2007 17:31:34 +1100

Stefan Döhla wrote:

> When I started xcalib, I crosschecked with some other calibration
> loaders to find out why gamma 1.0 in the vcgt tag makes the screen
> darker when using these other loaders - 1.0 was supposed to mean
> linear ...
>
> Therefore I took the system gamma into account, which is 2.2 on Win32
> and 2.222 on Unixes - voila: results were the same!

Right, but since it was Apple who created this tag, I think that
how they interpret it is what counts.

> The ramp is then created from the gamma values rGamma, rMax and rMin like 
this:
>
> for(j=0; j<nEntries;j++)
> {
>   ramp[j] = 65536.0 *
>           pow (j * (rMax - rMin) / nEntries, rGamma * SYSTEM_GAMMA)
>           + rMin);
> }
>
> I think xcalib's behaviour is correct - at least if the
> result is compared to other calibration loaders like the WindowsXP
> color panel, ...

According to Apple documentation, this isn't how it works.
See <http://developer.apple.com/technotes/tn/pdf/tn2007.pdf> page 8/9:

  Gamma values must be greater than 0.0.
  Specify a value of (1.0 / 1.6) to get an antigamma of 1.6.
  Min values must be greater than or equal to 0.0 and less than 1.0.
  Max values must be greater than 0.0 and less than or equal to 1.0.
  Returns kCGSRangeCheck error if the values are out of range or max is greater 
than or equal to Min.
  Values are computed by sampling a function for a range of indices from 0 
through 1:
  value = Min + ((Max - Min) * pow(index, Gamma))
  The resulting values are converted to a machine specific format and loaded 
into the hardware.

Checking on my Apple laptop, the "Gamma 2.2" profile Frédéric attached behaves
exactly the same with the Apple profile calibration loader as diswin,
brightening the screen considerably, so I conclude that the WindowsXP loader
is faulty, and dispwin is correct.

[I note in passing that dispwin doesn't work as a calibration loader on
 OSX - the O.S. seems to reset the LUTs when the application exits. I'll
 see if I can figure out how to avoid that, so it's more useful as a
 diagnostic tool.]

Graeme Gill.




Other related posts: