]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 3 Aug 2012 19:31:31 +0000 (19:31 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 3 Aug 2012 19:31:31 +0000 (19:31 +0000)
MagickCore/geometry.c
MagickWand/mogrify.c
MagickWand/operation.c

index 0c5ab40379a9b15dbdbc2c309238e1fe1746c39d..2f8d9c535c6c15fd2bd4553b5efb15c89e10bec9 100644 (file)
@@ -1447,7 +1447,7 @@ MagickExport MagickStatusType ParsePageGeometry(const Image *image,
     }
   flags=ParseMetaGeometry(geometry,&region_info->x,&region_info->y,
     &region_info->width,&region_info->height);
-  if ((flags & PercentValue) != 0)
+  if (((flags & PercentValue) != 0) || ((flags & SeparatorValue) == 0))
     {
       if ((flags & WidthValue) == 0)
         region_info->width=region_info->height;
index ad206812c2a134e2197158caacb303a6e0d3aa6f..961a56d8bf281f3ccb6c07e4b92c9784942eaae9 100644 (file)
@@ -965,8 +965,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             */
             (void) SyncImageSettings(mogrify_info,*image,exception);
             flags=ParsePageGeometry(*image,argv[i+1],&geometry,exception);
-            if ((flags & HeightValue) == 0)
-              geometry.height=geometry.width;
             mogrify_image=BorderImage(*image,&geometry,compose,exception);
             break;
           }
@@ -1661,8 +1659,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             flags=ParsePageGeometry(*image,argv[i+1],&geometry,exception);
             frame_info.width=geometry.width;
             frame_info.height=geometry.height;
-            if ((flags & HeightValue) == 0)
-              frame_info.height=geometry.width;
             frame_info.outer_bevel=geometry.x;
             frame_info.inner_bevel=geometry.y;
             frame_info.x=(ssize_t) frame_info.width;
@@ -2424,8 +2420,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               Surround image with a raise of solid color.
             */
             flags=ParsePageGeometry(*image,argv[i+1],&geometry,exception);
-            if ((flags & SigmaValue) == 0)
-              geometry.height=geometry.width;
             (void) RaiseImage(*image,&geometry,*option == '-' ? MagickTrue :
               MagickFalse,exception);
             break;
index 15eeff7d1544dd7fe53c0af0b06a9a8298482b1f..80fcc6ba53c0239289d46eec7ee7eb971db01dea 100644 (file)
@@ -1890,8 +1890,6 @@ static void CLISimpleOperatorImage(MagickCLI *cli_wand,
           flags=ParsePageGeometry(_image,arg1,&geometry,_exception);
           if ((flags & (WidthValue | HeightValue)) == 0)
             CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
-          if ((flags & HeightValue) == 0)
-            geometry.height=geometry.width;
           compose=OverCompositeOp;
           value=GetImageOption(_image_info,"compose");
           if (value != (const char *) NULL)
@@ -2361,7 +2359,7 @@ static void CLISimpleOperatorImage(MagickCLI *cli_wand,
           (void) ParsePageGeometry(_image,arg1,&geometry,_exception);
           (void) QueryColorCompliance(arg2,AllCompliance,&target,_exception);
           (void) FloodfillPaintImage(_image,_draw_info,&target,geometry.x,
-                    geometry.y,plus_alt_op,_exception);
+            geometry.y,plus_alt_op,_exception);
           break;
         }
       if (LocaleCompare("frame",option+1) == 0)
@@ -2376,19 +2374,15 @@ static void CLISimpleOperatorImage(MagickCLI *cli_wand,
             value;
 
           value=GetImageOption(_image_info,"compose");
-          if (value != (const char *) NULL)
-            compose=(CompositeOperator) ParseCommandOption(
-                 MagickComposeOptions,MagickFalse,value);
-          else
             compose=OverCompositeOp;  /* use Over not _image->compose */
-
+          if (value != (const char *) NULL)
+            compose=(CompositeOperator) ParseCommandOption(MagickComposeOptions,
+              MagickFalse,value);
           if (IfMagickFalse(IsGeometry(arg1)))
             CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
           flags=ParsePageGeometry(_image,arg1,&geometry,_exception);
           frame_info.width=geometry.width;
           frame_info.height=geometry.height;
-          if ((flags & HeightValue) == 0)
-            frame_info.height=geometry.width;
           frame_info.outer_bevel=geometry.x;
           frame_info.inner_bevel=geometry.y;
           frame_info.x=(ssize_t) frame_info.width;
@@ -2972,8 +2966,6 @@ static void CLISimpleOperatorImage(MagickCLI *cli_wand,
           if (IfMagickFalse(IsGeometry(arg1)))
             CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
           flags=ParsePageGeometry(_image,arg1,&geometry,_exception);
-          if ((flags & SigmaValue) == 0)
-            geometry.height=geometry.width;
           (void) RaiseImage(_image,&geometry,normal_op,_exception);
           break;
         }
@@ -3209,8 +3201,8 @@ static void CLISimpleOperatorImage(MagickCLI *cli_wand,
             CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
           if ((flags & SigmaValue) == 0)
             geometry_info.sigma=geometry_info.rho;
-          new_image=ShearImage(_image,geometry_info.rho,
-            geometry_info.sigma,_exception);
+          new_image=ShearImage(_image,geometry_info.rho,geometry_info.sigma,
+            _exception);
           break;
         }
       if (LocaleCompare("sigmoidal-contrast",option+1) == 0)