From: cristy Date: Thu, 28 Mar 2013 16:52:59 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3990 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc00815a716e2ea914d36a4cdbb82dc2b672cadd;p=imagemagick --- diff --git a/MagickCore/version.h b/MagickCore/version.h index 76dcd8fd5..47474751d 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -34,7 +34,7 @@ extern "C" { #define MagickLibAddendum "-0" #define MagickLibInterface 1 #define MagickLibMinInterface 1 -#define MagickReleaseDate "2013-03-25" +#define MagickReleaseDate "2013-03-28" #define MagickChangeDate "20121005" #define MagickAuthoritativeURL "http://www.imagemagick.org" #define MagickFeatures "DPC HDRI OpenMP" diff --git a/MagickWand/convert.c b/MagickWand/convert.c index 8e900c1de..9eeaab3e8 100644 --- a/MagickWand/convert.c +++ b/MagickWand/convert.c @@ -216,6 +216,7 @@ static MagickBooleanType ConvertUsage(void) "-gaussian-blur geometry", " reduce image noise and reduce detail levels", "-geometry geometry preferred size or location of the image", + "-grayscale method convert image to grayscale", "-identify identify the format and characteristics of the image", "-ift implements the inverse discrete Fourier transform (DFT)", "-implode amount implode image pixels about the center", @@ -1659,6 +1660,23 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info, argv[i]); break; } + if (LocaleCompare("grayscale",option+1) == 0) + { + ssize_t + method; + + if (*option == '+') + break; + i++; + if (i == (ssize_t) (argc-1)) + ThrowConvertException(OptionError,"MissingArgument",option); + method=ParseCommandOption(MagickPixelIntensityOptions,MagickFalse, + argv[i]); + if (method < 0) + ThrowConvertException(OptionError,"UnrecognizedIntensityMethod", + argv[i]); + break; + } if (LocaleCompare("green-primary",option+1) == 0) { if (*option == '+') diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c index d9067a049..9692d2da6 100644 --- a/MagickWand/mogrify.c +++ b/MagickWand/mogrify.c @@ -3305,6 +3305,7 @@ static MagickBooleanType MogrifyUsage(void) "-gaussian-blur geometry", " reduce image noise and reduce detail levels", "-geometry geometry preferred size or location of the image", + "-grayscale method convert image to grayscale", "-identify identify the format and characteristics of the image", "-ift implements the inverse discrete Fourier transform (DFT)", "-implode amount implode image pixels about the center", @@ -4755,16 +4756,16 @@ WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info, if (LocaleCompare("grayscale",option+1) == 0) { ssize_t - type; + method; if (*option == '+') break; i++; if (i == (ssize_t) (argc-1)) ThrowMogrifyException(OptionError,"MissingArgument",option); - type=ParseCommandOption(MagickPixelIntensityOptions,MagickFalse, + method=ParseCommandOption(MagickPixelIntensityOptions,MagickFalse, argv[i]); - if (type < 0) + if (method < 0) ThrowMogrifyException(OptionError,"UnrecognizedIntensityMethod", argv[i]); break; diff --git a/PerlMagick/quantum/quantum.xs.in b/PerlMagick/quantum/quantum.xs.in index 2b76eb531..7e3d6a7cc 100644 --- a/PerlMagick/quantum/quantum.xs.in +++ b/PerlMagick/quantum/quantum.xs.in @@ -541,7 +541,7 @@ static struct { "Perceptible", { {"epsilon", RealReference}, {"channel", MagickChannelOptions} } }, { "Poly", { {"terms", ArrayReference}, - {"channel", MagickChannelOptions} } } + {"channel", MagickChannelOptions} } }, { "Grayscale", { {"method", MagickNoiseOptions} } }, };