]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authoranthony <anthony@git.imagemagick.org>
Sat, 17 Mar 2012 06:52:53 +0000 (06:52 +0000)
committeranthony <anthony@git.imagemagick.org>
Sat, 17 Mar 2012 06:52:53 +0000 (06:52 +0000)
MagickCore/option.c
MagickWand/magick-cli.c
MagickWand/operation.c

index 2627bf5a2fdfd48f3d70c0acb60f92658e831d3c..78815bec7779764eecc14fb28c698543564568db 100644 (file)
@@ -470,7 +470,7 @@ static const OptionInfo
     { "+maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
     { "-maximum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
     { "+median", 1L, DeprecateOptionFlag, MagickTrue },
-    { "-median", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
+    { "-median", 1L, DeprecateOptionFlag | SimpleOperatorOptionFlag | FireOptionFlag, MagickTrue },
     { "+metric", 0L, NonMagickOptionFlag, MagickFalse },
     { "-metric", 1L, NonMagickOptionFlag, MagickFalse },
     { "+minimum", 0L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
@@ -524,10 +524,10 @@ static const OptionInfo
     { "-polaroid", 1L, SimpleOperatorOptionFlag, MagickFalse },
     { "+posterize", 1L, DeprecateOptionFlag, MagickTrue },
     { "-posterize", 1L, SimpleOperatorOptionFlag, MagickFalse },
-    { "+precision", 0L, GlobalOptionFlag, MagickFalse },
-    { "-precision", 1L, GlobalOptionFlag, MagickFalse },
-    { "+preview", 0L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
-    { "-preview", 1L, ImageInfoOptionFlag | SimpleOperatorOptionFlag, MagickFalse },
+    { "+precision", 0L, ImageInfoOptionFlag, MagickFalse },
+    { "-precision", 1L, ImageInfoOptionFlag, MagickFalse },
+    { "+preview", 0L, DeprecateOptionFlag, MagickTrue },
+    { "-preview", 1L, GlobalOptionFlag, MagickFalse },
     { "+print", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
     { "-print", 1L, ListOperatorOptionFlag | FireOptionFlag, MagickFalse },
     { "+process", 1L, DeprecateOptionFlag | FireOptionFlag, MagickTrue },
index cf3a7d5e0efa63bcbb19161f5b41aa647067f7e0..5cac71225db40ad2ea220ea25ccd44de450ecc9e 100644 (file)
@@ -251,22 +251,28 @@ WandExport void ProcessScriptOptions(MagickCLI *cli_wand,int argc,char **argv,
     else
       CloneString(&arg2,(char *)NULL);
 
-    /* handle script special options here */
-    //either continue processing command line
-    // or making use of the command line options.
-    //CLICommandOptions(cli_wand,count+1,argv, MagickScriptArgsFlags);
-
 #if MagickCommandDebug
     (void) FormatLocaleFile(stderr,
         "Script Option: \"%s\" \tCount: %d  Flags: %04x  Args: \"%s\" \"%s\"\n",
         option,(int) count,option_type,arg1,arg2);
 #endif
 
-    /* Process non-script specific option from file */
+    if ( (option_type & DeprecateOptionFlag) != 0 ) {
+      CLIWandException(OptionWarning,"DeprecatedOption",option);
+      if ( CLICatchException(cli_wand, MagickFalse) != MagickFalse )
+        break;
+    }
+
+    /* handle special script-argument options here */
+    //either continue processing command line
+    // or making use of the command line options.
+    //CLICommandOptions(cli_wand,count+1,argv, MagickScriptArgsFlags);
+
+    /* Process Option from file */
     if ( (option_type & SpecialOptionFlag) != 0 ) {
       if ( LocaleCompare(option,"-exit") == 0 )
         break;
-      /* No "-script" option from script at this time */
+      /* No "-script" option from script at this time - though posible */
       CLISpecialOperator(cli_wand,option,arg1);
     }
 
index 45f48696eb7ce8f88ca8ecb41097309789024a28..b61e6dffa8bd5425fd7e798e8839ee55c42e5378 100644 (file)
@@ -1215,7 +1215,7 @@ WandExport void CLISettingOptionInfo(MagickCLI *cli_wand,
           break;
         }
       /* FUTURE: Only the 'preview' coder appears to use this
-       * Depreciate the coder?  Leaving only the 'preview' operator.
+       * DEPRECIATE the coder?  Leaving only the 'preview' operator.
       if (LocaleCompare("preview",option+1) == 0)
         {
           image_info->preview_type=UndefinedPreview;
@@ -2666,6 +2666,12 @@ static void CLISimpleOperatorImage(MagickCLI *cli_wand,
                          DeactivateAlphaChannel, exception);
           break;
         }
+      if (LocaleCompare("median",option+1) == 0)
+        {
+          /* DEPRECIATED - use -statistic Median */
+          CLISimpleOperatorImage(cli_wand,"-statistic","Median",arg1);
+          break;
+        }
       if (LocaleCompare("mode",option+1) == 0)
         {
           flags=ParseGeometry(arg1,&geometry_info);
@@ -3259,7 +3265,7 @@ static void CLISimpleOperatorImage(MagickCLI *cli_wand,
         }
       if (LocaleCompare("transform",option+1) == 0)
         {
-          /* DEPRECIATED */
+          /* DEPRECIATED -- should really use Distort AffineProjection */
           new_image=AffineTransformImage(image,&draw_info->affine,
             exception);
           break;