From: nicolas Date: Wed, 1 Aug 2012 21:01:13 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~5206 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a531f7071b1e7fd664aa0cdf4042a6d641fb331e;p=imagemagick --- diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c index fad559646..f84167e4f 100644 --- a/MagickCore/enhance.c +++ b/MagickCore/enhance.c @@ -3396,16 +3396,15 @@ MagickExport MagickBooleanType SigmoidalContrastImage(Image *image, * range. * * "+epsilon" is to allow a=0 without division by zero. - * - * Nicolas is still trying to figure out what the "+0.5" is for. - * They may be gone later. */ sigmoidal_map[i]=(MagickRealType) ScaleMapToQuantum((MagickRealType) - (MaxMap*(0.5+(uu-(u0+u1)/2.0)/(u1-u0+MagickEpsilon))+0.5)); + (MaxMap*(0.5+(uu-(u0+u1)/2.0)/(u1-u0+MagickEpsilon)))); #else /* Scaled sigmoidal formula: (1/(1+exp(a*(b-u))) - 1/(1+exp(a*b))) * / * (1/(1+exp(a*(b-1))) - 1/(1+exp(a*b))) + * + * Nicolas is still trying to figure out what the "+0.5" is for. */ sigmoidal_map[i]=(MagickRealType) ScaleMapToQuantum((MagickRealType) (MaxMap*((uu-u0)/(u1-u0))+0.5));