From: cristy Date: Tue, 13 Jan 2015 01:23:56 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~1447 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=110fbd73283f04419af70412fa7cf63ab9e5940f;p=imagemagick --- diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 38b4e33aa..51a16bf26 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -2432,6 +2432,16 @@ static double FxEvaluateSubexpression(FxInfo *fx_info, exception); return((double) ceil((double) alpha)); } + if (LocaleNCompare(expression,"clamp",5) == 0) + { + alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+5,beta, + exception); + if (alpha < 0.0) + return(0.0); + if (alpha > 1.0) + return(1.0); + return(alpha); + } if (LocaleNCompare(expression,"cosh",4) == 0) { alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+4,beta,