]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sun, 5 Aug 2018 21:15:04 +0000 (17:15 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 5 Aug 2018 21:15:04 +0000 (17:15 -0400)
MagickWand/mogrify.c
MagickWand/operation.c

index 7e3546e2f689785ee1a32f465231d40b9f6543d3..fc8e9e95cb9466d9e5728af6dabc4312936dac78 100644 (file)
@@ -2566,7 +2566,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
                 geometry_info.xi*=(double) (0.01*QuantumRange);
                 geometry_info.psi*=(double) (0.01*QuantumRange);
               }
-            (void) RandomThresholdImage(*image,geometry_info.rho,
+            (void) RangeThresholdImage(*image,geometry_info.rho,
               geometry_info.sigma,geometry_info.xi,geometry_info.psi,exception);
             break;
           }
index c083b832f4e3a183cc04e1f3140b5572dc44e042..085e6d0488aecd8f4b82f598b776a96d8a71665b 100644 (file)
@@ -3052,27 +3052,28 @@ static MagickBooleanType CLISimpleOperatorImage(MagickCLI *cli_wand,
             _exception);
           break;
         }
-      if (LocaleCompare("random-threshold",option+1) == 0)
+      if (LocaleCompare("range-threshold",option+1) == 0)
         {
           /*
             Range threshold image.
           */
-          (void) SyncImageSettings(mogrify_info,*image,exception);
-          flags=ParseGeometry(argv[i+1],&geometry_info);
+          if (IsGeometry(arg1) == MagickFalse)
+            CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
+          flags=ParseGeometry(arg1,&geometry_info);
           if ((flags & SigmaValue) == 0)
             geometry_info.sigma=geometry_info.rho;
           if ((flags & XiValue) == 0)
             geometry_info.xi=geometry_info.sigma;
           if ((flags & PsiValue) == 0)
             geometry_info.psi=geometry_info.xi;
-          if (strchr(argv[i+1],'%') != (char *) NULL)
+          if (strchr(argv1,'%') != (char *) NULL)
             {
               geometry_info.rho*=(double) (0.01*QuantumRange);
               geometry_info.sigma*=(double) (0.01*QuantumRange);
               geometry_info.xi*=(double) (0.01*QuantumRange);
               geometry_info.psi*=(double) (0.01*QuantumRange);
             }
-          (void) RandomThresholdImage(*image,geometry_info.rho,
+          (void) RangeThresholdImage(_image,geometry_info.rho,
             geometry_info.sigma,geometry_info.xi,geometry_info.psi,exception);
           break;
         }