From 756a447eed3f66570d73e5217d3d437e6ed8f45e Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 26 Nov 2016 09:17:41 -0500 Subject: [PATCH] Support the compare -read-mask option --- ChangeLog | 3 +++ MagickWand/compare.c | 17 ++++++++++++++--- utilities/compare.1.in | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb1496dd0..9b0828401 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2016-11-26 7.0.3-9 Cristy + * Support the compare -read-mask option. + 2016-11-15 7.0.3-8 Cristy * Release ImageMagick version 7.0.3-8, GIT revision 19067:5aceded:20161125. diff --git a/MagickWand/compare.c b/MagickWand/compare.c index ecfc5ddec..cb57c4512 100644 --- a/MagickWand/compare.c +++ b/MagickWand/compare.c @@ -128,6 +128,7 @@ static MagickBooleanType CompareUsage(void) "-quality value JPEG/MIFF/PNG compression level", "-quiet suppress all warning messages", "-quantize colorspace reduce colors in this colorspace", + "-read-mask filename associate a read mask with the image", "-regard-warnings pay attention to warning messages", "-respect-parentheses settings remain in effect until parenthesis boundary", "-sampling-factor geometry", @@ -348,10 +349,11 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info, i++; if (i == (ssize_t) argc) ThrowCompareException(OptionError,"MissingArgument",option); - type=ParseCommandOption(MagickAlphaChannelOptions,MagickFalse,argv[i]); + type=ParseCommandOption(MagickAlphaChannelOptions,MagickFalse, + argv[i]); if (type < 0) - ThrowCompareException(OptionError,"UnrecognizedAlphaChannelOption", - argv[i]); + ThrowCompareException(OptionError, + "UnrecognizedAlphaChannelOption",argv[i]); break; } if (LocaleCompare("authenticate",option+1) == 0) @@ -774,6 +776,15 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info, } case 'r': { + if (LocaleCompare("read-mask",option+1) == 0) + { + if (*option == '+') + break; + i++; + if (i == (ssize_t) argc) + ThrowCompareException(OptionError,"MissingArgument",option); + break; + } if (LocaleCompare("regard-warnings",option+1) == 0) break; if (LocaleNCompare("respect-parentheses",option+1,17) == 0) diff --git a/utilities/compare.1.in b/utilities/compare.1.in index 859b79de7..0f0734b17 100644 --- a/utilities/compare.1.in +++ b/utilities/compare.1.in @@ -40,6 +40,7 @@ Image Settings: \-quality value JPEG/MIFF/PNG compression level \-quiet suppress all warning messages \-quantize colorspace reduce colors in this colorspace + \-read-mask filename associate a read mask with the image \-regard-warnings pay attention to warning messages \-respect-parentheses settings remain in effect until parenthesis boundary \-sampling-factor geometry -- 2.49.0