]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 12 Aug 2010 16:13:36 +0000 (16:13 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 12 Aug 2010 16:13:36 +0000 (16:13 +0000)
magick/fx.c
www/wand.png [new file with mode: 0644]

index 1ae84ef2887cee50cfdbe5e20898903c3242c77a..bf925e36abaa10db59c3ea1db4be56c42fb81b93 100644 (file)
@@ -2707,6 +2707,14 @@ static MagickRealType FxEvaluateSubexpression(FxInfo *fx_info,
         }
       if (LocaleCompare(expression,"Transparent") == 0)
         return(0.0);
+      if (LocaleNCompare(expression,"trunc",5) == 0)
+        {
+          alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+5,beta,
+            exception);
+          alpha=alpha < 0.0 ? ceil((double) alpha) : 0.0 < alpha ?
+            floor((double) alpha) : alpha;
+          return(alpha);
+        }
       if (LocaleCompare(expression,"t") == 0)
         return(FxGetSymbol(fx_info,channel,x,y,expression,exception));
       break;
diff --git a/www/wand.png b/www/wand.png
new file mode 100644 (file)
index 0000000..f4fe5f9
Binary files /dev/null and b/www/wand.png differ