From: Cristy Date: Mon, 6 Aug 2018 21:47:30 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.8-10~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37b25f5aa32d8a3b9daf2e9f415d3482f1fe9d68;p=imagemagick ... --- diff --git a/MagickCore/threshold.c b/MagickCore/threshold.c index 0c87b5826..7d8270b57 100644 --- a/MagickCore/threshold.c +++ b/MagickCore/threshold.c @@ -2225,15 +2225,15 @@ MagickExport MagickBooleanType RangeThresholdImage(Image *image, q[i]=0; else if ((pixel >= low_soft) && (pixel < high_soft)) - q[i]=ClampToQuantum(PerceptibleReciprocal(high_soft-low_soft)* - (pixel-low_soft)); + q[i]=ClampToQuantum(QuantumRange* + PerceptibleReciprocal(high_soft-low_soft)*(pixel-low_soft)); else if ((pixel >= high_soft) && (pixel <= low_hard)) q[i]=QuantumRange; else if ((pixel > low_hard) && (pixel <= high_hard)) - q[i]=ClampToQuantum(PerceptibleReciprocal(high_hard-low_hard)* - (high_hard-pixel)); + q[i]=ClampToQuantum(QuantumRange* + PerceptibleReciprocal(high_hard-low_hard)*(high_hard-pixel)); else if (pixel > high_hard) q[i]=0;