diff options
author | Marti Maria <info@littlecms.com> | 2010-05-28 15:53:51 +0200 |
---|---|---|
committer | Marti Maria <info@littlecms.com> | 2010-05-28 15:53:51 +0200 |
commit | 1cff024fdbe91539839a46d830081da78775f419 (patch) | |
tree | 044c14c0d77fd3a697e43ad1644eb3b157e2b7f1 | |
parent | 96c149005d21a79dcb2ed7b2106827ebe918d663 (diff) | |
download | lcms2-1cff024fdbe91539839a46d830081da78775f419.tar.gz |
Trilinear interpolation
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | src/cmsio1.c | 14 |
2 files changed, 11 insertions, 4 deletions
@@ -18,3 +18,4 @@ Richard Hughes Special Thanks -------------- Jan Morovic +Jos Vernon (WebSupergoo) diff --git a/src/cmsio1.c b/src/cmsio1.c index c367627..4035a47 100644 --- a/src/cmsio1.c +++ b/src/cmsio1.c @@ -439,12 +439,12 @@ cmsPipeline* _cmsReadOutputLUT(cmsHPROFILE hProfile, int Intent) // The profile owns the Lut, so we need to copy it Lut = cmsPipelineDup(Lut); + if (Lut == NULL) return NULL; // 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 (cmsGetPCS(hProfile) == cmsSigLabData) - ChangeInterpolationToTrilinear(Lut); + // Lab used as indexer space, trilinear interpolation should be used + if (cmsGetPCS(hProfile) == cmsSigLabData) + ChangeInterpolationToTrilinear(Lut); // We need to adjust data only for Lab and Lut16 type if (OriginalType != cmsSigLut16Type || cmsGetPCS(hProfile) != cmsSigLabData) @@ -507,6 +507,12 @@ cmsPipeline* _cmsReadDevicelinkLUT(cmsHPROFILE hProfile, int Intent) // The profile owns the Lut, so we need to copy it Lut = cmsPipelineDup(Lut); + if (Lut == NULL) return NULL; + + // 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) + ChangeInterpolationToTrilinear(Lut); // After reading it, we have info about the original type OriginalType = _cmsGetTagTrueType(hProfile, tag16); |