diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-12-10 02:54:25 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-12-10 02:54:25 +0400 |
commit | 7d6dcce957e5439eda144f75a79b5c32f0b1b46a (patch) | |
tree | 9ee2e1631246e6dfbd993f7af13307b33903afa2 /src/thirdparty/lcms2 | |
parent | f6a05e86c08c023c8a6b5cdb24ff3df6292696a0 (diff) |
update lcms2 to git 026ba4f
Diffstat (limited to 'src/thirdparty/lcms2')
-rw-r--r-- | src/thirdparty/lcms2/src/cmstypes.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/thirdparty/lcms2/src/cmstypes.c b/src/thirdparty/lcms2/src/cmstypes.c index ddbd49be9..344a933f5 100644 --- a/src/thirdparty/lcms2/src/cmstypes.c +++ b/src/thirdparty/lcms2/src/cmstypes.c @@ -1077,21 +1077,22 @@ void *Type_Curve_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cm {
cmsUInt32Number Count;
cmsToneCurve* NewGamma;
- cmsUInt16Number Linear[2] = { 0, 0xffff };
-
-
+
*nItems = 0;
if (!_cmsReadUInt32Number(io, &Count)) return NULL;
switch (Count) {
case 0: // Linear.
+ {
+ cmsFloat64Number SingleGamma = 1.0;
- NewGamma = cmsBuildTabulatedToneCurve16(self ->ContextID, 2, Linear);
- if (!NewGamma) return NULL;
- *nItems = 1;
- return NewGamma;
-
+ NewGamma = cmsBuildParametricToneCurve(self ->ContextID, 1, &SingleGamma);
+ if (!NewGamma) return NULL;
+ *nItems = 1;
+ return NewGamma;
+ }
+
case 1: // Specified as the exponent of gamma function
{
cmsUInt16Number SingleGammaFixed;
|