From: anthony Date: Sat, 17 Mar 2012 06:52:53 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6031 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3ef4edee00e3080a46bea720800b44d0f8ebe32;p=imagemagick --- diff --git a/MagickCore/option.c b/MagickCore/option.c index 2627bf5a2..78815bec7 100644 --- a/MagickCore/option.c +++ b/MagickCore/option.c @@ -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 }, diff --git a/MagickWand/magick-cli.c b/MagickWand/magick-cli.c index cf3a7d5e0..5cac71225 100644 --- a/MagickWand/magick-cli.c +++ b/MagickWand/magick-cli.c @@ -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); } diff --git a/MagickWand/operation.c b/MagickWand/operation.c index 45f48696e..b61e6dffa 100644 --- a/MagickWand/operation.c +++ b/MagickWand/operation.c @@ -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;