diff options
author | Marti Maria <info@littlecms.com> | 2013-09-07 16:29:59 +0200 |
---|---|---|
committer | Marti Maria <info@littlecms.com> | 2013-09-07 16:29:59 +0200 |
commit | ce0c8a075dabcccbec4c6927739c73b2adccc874 (patch) | |
tree | 84c8d1cd71bbbb084241d1c16545bd21fc388eec | |
parent | 4eb014040dfdf18b066929c48ff04d033533f1af (diff) | |
download | lcms2-ce0c8a075dabcccbec4c6927739c73b2adccc874.tar.gz |
Fixed v2 devicelink on Lab space.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/cmsio1.c | 11 |
2 files changed, 6 insertions, 6 deletions
@@ -128,3 +128,4 @@ Added some checks for non-happy path, mostly failing mallocs Fixed a double free in recovering from a previous error in default intent handler. Fixed some indexing out of bounds in floating point interpolation +Fixed a bug in PCS/Colorspace order when reading V2 Lab devicelinks diff --git a/src/cmsio1.c b/src/cmsio1.c index 71f4910..b049c45 100644 --- a/src/cmsio1.c +++ b/src/cmsio1.c @@ -687,8 +687,8 @@ Error: return NULL; } -// This one includes abstract profiles as well. Matrix-shaper cannot be obtained on that device class. The -// tag name here may default to AToB0 +// This one includes abstract profiles as well. Matrix-shaper cannot be used on that device class. +// The tag name here may default to AToB0 cmsPipeline* _cmsReadDevicelinkLUT(cmsHPROFILE hProfile, int Intent) { cmsPipeline* Lut; @@ -697,7 +697,6 @@ cmsPipeline* _cmsReadDevicelinkLUT(cmsHPROFILE hProfile, int Intent) cmsTagSignature tagFloat = Device2PCSFloat[Intent]; cmsContext ContextID = cmsGetProfileContextID(hProfile); - // On named color, take the appropiate tag if (cmsGetDeviceClass(hProfile) == cmsSigNamedColorClass) { @@ -753,7 +752,7 @@ Error: // Now it is time for a controversial stuff. I found that for 3D LUTS using // Lab used as indexer space, trilinear interpolation should be used - if (cmsGetColorSpace(hProfile) == cmsSigLabData) + if (cmsGetPCS(hProfile) == cmsSigLabData) ChangeInterpolationToTrilinear(Lut); // After reading it, we have info about the original type @@ -764,12 +763,12 @@ Error: // Here it is possible to get Lab on both sides - if (cmsGetPCS(hProfile) == cmsSigLabData) { + if (cmsGetColorSpace(hProfile) == cmsSigLabData) { if(!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID))) goto Error2; } - if (cmsGetColorSpace(hProfile) == cmsSigLabData) { + if (cmsGetPCS(hProfile) == cmsSigLabData) { if(!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) goto Error2; } |