]> granicus.if.org Git - imagemagick/commitdiff
Support the compare -read-mask option
authorCristy <urban-warrior@imagemagick.org>
Sat, 26 Nov 2016 14:17:41 +0000 (09:17 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 26 Nov 2016 14:17:41 +0000 (09:17 -0500)
ChangeLog
MagickWand/compare.c
utilities/compare.1.in

index cb1496dd04113bacad2978888dc5646509746ac4..9b0828401552d02e6db9c1ba4dac1b1d7d37737a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2016-11-26  7.0.3-9 Cristy  <quetzlzacatenango@image...>
+  * Support the compare -read-mask option.
+
 2016-11-15  7.0.3-8 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.3-8, GIT revision 19067:5aceded:20161125.
 
index ecfc5ddecf7e53304969fe11c1e9f8fe5c3a2798..cb57c45129f8ec10d35bfe8a2fb64b5eb12ca043 100644 (file)
@@ -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)
index 859b79de7ec1d13ef1dde6be74113bfc07f30681..0f0734b171951e2c33aac574e8c8577ef1fabc82 100644 (file)
@@ -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