|
|
@ -247,11 +247,11 @@ LPGAMMATABLE cmsxEstimateGamma(LPSAMPLEDCURVE X, LPSAMPLEDCURVE Y, int nResultin
|
|
|
|
/* maximum will not fall on exactly 100. */
|
|
|
|
/* maximum will not fall on exactly 100. */
|
|
|
|
|
|
|
|
|
|
|
|
if (!OneTry(X, Y, a))
|
|
|
|
if (!OneTry(X, Y, a))
|
|
|
|
return false;
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
|
|
/* Got parameters. Compute maximum. */
|
|
|
|
/* Got parameters. Compute maximum. */
|
|
|
|
e = a[1]* 255.0 + a[2];
|
|
|
|
e = a[1]* 255.0 + a[2];
|
|
|
|
if (e < 0) return false;
|
|
|
|
if (e < 0) return 0;
|
|
|
|
Max = pow(e, a[0]);
|
|
|
|
Max = pow(e, a[0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -261,7 +261,7 @@ LPGAMMATABLE cmsxEstimateGamma(LPSAMPLEDCURVE X, LPSAMPLEDCURVE Y, int nResultin
|
|
|
|
|
|
|
|
|
|
|
|
/* Do the final fitting */
|
|
|
|
/* Do the final fitting */
|
|
|
|
if (!OneTry(XNorm, YNorm, a))
|
|
|
|
if (!OneTry(XNorm, YNorm, a))
|
|
|
|
return false;
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
|
|
/* Type 3 = IEC 61966-2.1 (sRGB) */
|
|
|
|
/* Type 3 = IEC 61966-2.1 (sRGB) */
|
|
|
|
/* Y = (aX + b)^Gamma | X >= d */
|
|
|
|
/* Y = (aX + b)^Gamma | X >= d */
|
|
|
|