From: Cristy Date: Sat, 8 Dec 2018 17:42:23 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/1404 X-Git-Tag: 7.0.8-16~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea70321aacad18b383c87b92589b85fce691d8a3;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1404 --- diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c index da235741b..f51d92a71 100644 --- a/MagickWand/mogrify.c +++ b/MagickWand/mogrify.c @@ -1087,12 +1087,6 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, */ (void) SyncImageSettings(mogrify_info,*image,exception); flags=ParseGeometry(argv[i+1],&geometry_info); - if ((flags & XiValue) == 0) - geometry_info.xi=128.0; - if ((flags & PercentValue) != 0) - geometry_info.psi=(double) ((PerceptibleReciprocal( - geometry_info.xi)*(geometry_info.rho*geometry_info.sigma))* - (1.0+65535.0*geometry_info.psi/100.0)); (void) CLAHEImage(*image,(size_t) geometry_info.rho,(size_t) geometry_info.sigma,(size_t) geometry_info.xi,(double) geometry_info.psi,exception); diff --git a/MagickWand/operation.c b/MagickWand/operation.c index af33f5b80..de0250bb5 100644 --- a/MagickWand/operation.c +++ b/MagickWand/operation.c @@ -1971,12 +1971,6 @@ static MagickBooleanType CLISimpleOperatorImage(MagickCLI *cli_wand, flags=ParseGeometry(arg1,&geometry_info); if ((flags & (RhoValue|SigmaValue)) == 0) CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1); - if ((flags & XiValue) == 0) - geometry_info.xi=128.0; - if ((flags & PercentValue) != 0) - geometry_info.psi=(double) ((PerceptibleReciprocal( - geometry_info.xi)*(geometry_info.rho*geometry_info.sigma))* - (1.0+65535.0*geometry_info.psi/100.0)); (void) CLAHEImage(_image,(size_t) geometry_info.rho,(size_t) geometry_info.sigma,geometry_info.xi,geometry_info.psi,_exception); break; diff --git a/PerlMagick/Magick.xs b/PerlMagick/Magick.xs index cbeeb9fc5..df06c0e87 100644 --- a/PerlMagick/Magick.xs +++ b/PerlMagick/Magick.xs @@ -11479,16 +11479,8 @@ Mogrify(ref,...) case 149: /* CLAHE */ { if (attribute_flag[0] != 0) - { - flags=ParseGeometry(argument_list[0].string_reference, - &geometry_info); - if ((flags & XiValue) == 0) - geometry_info.xi=128.0; - if ((flags & PercentValue) != 0) - geometry_info.psi=(double) ((PerceptibleReciprocal( - geometry_info.xi)*(geometry_info.rho*geometry_info.sigma))* - (1.0+65535.0*geometry_info.psi/100.0)); - } + flags=ParseGeometry(argument_list[0].string_reference, + &geometry_info); if (attribute_flag[1] != 0) geometry_info.rho=argument_list[1].integer_reference; if (attribute_flag[2] != 0) diff --git a/PerlMagick/quantum/quantum.xs.in b/PerlMagick/quantum/quantum.xs.in index cd8b8782c..886f5b603 100644 --- a/PerlMagick/quantum/quantum.xs.in +++ b/PerlMagick/quantum/quantum.xs.in @@ -11485,16 +11485,8 @@ Mogrify(ref,...) case 149: /* CLAHE */ { if (attribute_flag[0] != 0) - { - flags=ParseGeometry(argument_list[0].string_reference, - &geometry_info); - if ((flags & XiValue) == 0) - geometry_info.xi=128.0; - if ((flags & PercentValue) != 0) - geometry_info.psi=(double) ((PerceptibleReciprocal( - geometry_info.xi)*(geometry_info.rho*geometry_info.sigma))* - (1.0+65535.0*geometry_info.psi/100.0)); - } + flags=ParseGeometry(argument_list[0].string_reference, + &geometry_info); if (attribute_flag[1] != 0) geometry_info.rho=argument_list[1].integer_reference; if (attribute_flag[2] != 0)