From ca6da3ea591c6b36a2a10be07f8f7a5d78c76b26 Mon Sep 17 00:00:00 2001 From: cristy Date: Fri, 26 Mar 2010 01:27:47 +0000 Subject: [PATCH] --- magick/enhance.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/magick/enhance.c b/magick/enhance.c index f28a3688a..629286a49 100644 --- a/magick/enhance.c +++ b/magick/enhance.c @@ -290,10 +290,7 @@ MagickExport MagickBooleanType BrightnessContrastImageChannel(Image *image, if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); alpha=contrast; - if ((100-contrast) <= 0.1) - alpha=99.999999; - slope=MagickPI*(((alpha*alpha)/20000.0)+(3.0*alpha/200.0))/4.0; - slope=sin(slope)/cos(slope)+1.0; + slope=tan(MagickPI*(alpha/100.0+1.0)/4.0); if (slope < 0.0) slope=0.0; intercept=brightness/100.0+((100-brightness)/200.0)*(1.0-slope); -- 2.50.1