diff options
author | Marti Maria <info@littlecms.com> | 2011-02-22 16:26:19 +0100 |
---|---|---|
committer | Marti Maria <info@littlecms.com> | 2011-02-22 16:26:19 +0100 |
commit | 1647ce11d8194fa70da7b7b5c31673626be6ab53 (patch) | |
tree | f5c5610988c4b476b03642cef314091623bd9d0e /src/cmsio1.c | |
parent | 16cbf1ae325ab4d9312906cd1617991416023c7e (diff) | |
download | lcms2-1647ce11d8194fa70da7b7b5c31673626be6ab53.tar.gz |
Fixed bug in Lab to Lab colorspace profiles
Diffstat (limited to 'src/cmsio1.c')
-rw-r--r-- | src/cmsio1.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmsio1.c b/src/cmsio1.c index b575730..7be30e7 100644 --- a/src/cmsio1.c +++ b/src/cmsio1.c @@ -275,6 +275,10 @@ cmsPipeline* _cmsReadInputLUT(cmsHPROFILE hProfile, int Intent) if (OriginalType != cmsSigLut16Type || cmsGetPCS(hProfile) != cmsSigLabData) return Lut; + // If the input is Lab, add also a conversion at the begin + if (cmsGetColorSpace(hProfile) == cmsSigLabData) + cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID)); + // Add a matrix for conversion V2 to V4 Lab PCS cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); return Lut; @@ -452,6 +456,11 @@ cmsPipeline* _cmsReadOutputLUT(cmsHPROFILE hProfile, int Intent) // Add a matrix for conversion V4 to V2 Lab PCS cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID)); + + // If the output is Lab, add also a conversion at the end + if (cmsGetColorSpace(hProfile) == cmsSigLabData) + cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)); + return Lut; } |