From ce0c8a075dabcccbec4c6927739c73b2adccc874 Mon Sep 17 00:00:00 2001 From: Marti Maria Date: Sat, 7 Sep 2013 16:29:59 +0200 Subject: Fixed v2 devicelink on Lab space. --- ChangeLog | 1 + src/cmsio1.c | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 11d3f12..21d4edf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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; } -- cgit v1.2.1