From: cristy Date: Fri, 3 Aug 2012 19:31:31 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~5196 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b8926134c1e07e0d0ef4562af3c9fc130e432d1;p=imagemagick --- diff --git a/MagickCore/geometry.c b/MagickCore/geometry.c index 0c5ab4037..2f8d9c535 100644 --- a/MagickCore/geometry.c +++ b/MagickCore/geometry.c @@ -1447,7 +1447,7 @@ MagickExport MagickStatusType ParsePageGeometry(const Image *image, } flags=ParseMetaGeometry(geometry,®ion_info->x,®ion_info->y, ®ion_info->width,®ion_info->height); - if ((flags & PercentValue) != 0) + if (((flags & PercentValue) != 0) || ((flags & SeparatorValue) == 0)) { if ((flags & WidthValue) == 0) region_info->width=region_info->height; diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c index ad206812c..961a56d8b 100644 --- a/MagickWand/mogrify.c +++ b/MagickWand/mogrify.c @@ -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; diff --git a/MagickWand/operation.c b/MagickWand/operation.c index 15eeff7d1..80fcc6ba5 100644 --- a/MagickWand/operation.c +++ b/MagickWand/operation.c @@ -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)