diff options
author | Marti Maria <marti.maria@littlecms.com> | 2022-11-27 17:39:58 +0100 |
---|---|---|
committer | Marti Maria <marti.maria@littlecms.com> | 2022-11-27 17:39:58 +0100 |
commit | caab4c07e60022a0f776b543eaa30785e2bb42ed (patch) | |
tree | 5f4b0169556ebf693dc1ad5ba1840b79942abe85 /src | |
parent | c8ed7427b83df73f3039ef570c48c6b995c2a7ab (diff) | |
download | lcms2-caab4c07e60022a0f776b543eaa30785e2bb42ed.tar.gz |
fix a bug on BPC black point detection in case of matrix-shaper with inverted curves.
Thanks to Ralf Junker for finding the rare case.
Diffstat (limited to 'src')
-rw-r--r-- | src/cmssamp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cmssamp.c b/src/cmssamp.c index f5957d1..124deff 100644 --- a/src/cmssamp.c +++ b/src/cmssamp.c @@ -123,10 +123,9 @@ cmsBool BlackPointAsDarkerColorant(cmsHPROFILE hInput, // Convert black to Lab cmsDoTransform(xform, Black, &Lab, 1); - // Force it to be neutral, clip to max. L* of 50 + // Force it to be neutral, check for inconsistences Lab.a = Lab.b = 0; - if (Lab.L > 50) Lab.L = 50; - if (Lab.L < 0) Lab.L = 0; + if (Lab.L > 50 || Lab.L < 0) Lab.L = 0; // Free the resources cmsDeleteTransform(xform); |