From 077ee1b61ea6be02ea1a9b026f02493fd1602d89 Mon Sep 17 00:00:00 2001 From: nicolas Date: Wed, 1 Aug 2012 18:25:10 +0000 Subject: [PATCH] sigmoid-contrast: +0.5 is for cheap rounding --- MagickCore/enhance.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c index 982c8923b..7cb804427 100644 --- a/MagickCore/enhance.c +++ b/MagickCore/enhance.c @@ -3395,10 +3395,6 @@ MagickExport MagickBooleanType SigmoidalContrastImage(Image *image, /* 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))) - * + 0.5 - * - * Nicolas strongly suspects that the +0.5 in the code is at the - * wrong paren nesting (does not match the previous one). */ sigmoidal_map[i]=(MagickRealType) ScaleMapToQuantum((MagickRealType) (MaxMap*((1.0/(1.0+exp(contrast*(midpoint/(double) QuantumRange- -- 2.40.0