From: cristy Date: Mon, 4 Jun 2012 21:26:19 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~5493 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d2287c3237047a4effcb33f2c07c075c62fdf26;p=imagemagick --- diff --git a/MagickCore/effect.c b/MagickCore/effect.c index 14f386656..cd99903fd 100644 --- a/MagickCore/effect.c +++ b/MagickCore/effect.c @@ -216,7 +216,7 @@ MagickExport Image *AdaptiveBlurImage(const Image *image,const double radius, blur_image=CloneImage(image,image->columns,image->rows,MagickTrue,exception); if (blur_image == (Image *) NULL) return((Image *) NULL); - if (fabs(sigma) <= MagickEpsilon) + if (fabs(sigma) < MagickEpsilon) return(blur_image); if (SetImageStorageClass(blur_image,DirectClass,exception) == MagickFalse) { @@ -271,8 +271,8 @@ MagickExport Image *AdaptiveBlurImage(const Image *image,const double radius, k++; } } - if (fabs(normalize) <= MagickEpsilon) - normalize=1.0; + if (fabs(normalize) < MagickEpsilon) + normalize=MagickEpsilon; normalize=1.0/normalize; for (k=0; k < (j*j); k++) kernel[i][k]=normalize*kernel[i][k]; @@ -598,8 +598,8 @@ MagickExport Image *AdaptiveSharpenImage(const Image *image,const double radius, k++; } } - if (fabs(normalize) <= MagickEpsilon) - normalize=1.0; + if (fabs(normalize) < MagickEpsilon) + normalize=MagickEpsilon; normalize=1.0/normalize; for (k=0; k < (j*j); k++) kernel[i][k]=normalize*kernel[i][k]; @@ -905,7 +905,7 @@ MagickExport Image *BlurImage(const Image *image,const double radius, blur_image=CloneImage(image,0,0,MagickTrue,exception); if (blur_image == (Image *) NULL) return((Image *) NULL); - if (fabs(sigma) <= MagickEpsilon) + if (fabs(sigma) < MagickEpsilon) return(blur_image); if (SetImageStorageClass(blur_image,DirectClass,exception) == MagickFalse) { diff --git a/MagickWand/drawing-wand.c b/MagickWand/drawing-wand.c index 68eed0d0c..3a12cfef4 100644 --- a/MagickWand/drawing-wand.c +++ b/MagickWand/drawing-wand.c @@ -5049,7 +5049,7 @@ WandExport void DrawSetFontSize(DrawingWand *wand,const double pointsize) if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if ((wand->filter_off != MagickFalse) || - (fabs(CurrentContext->pointsize-pointsize) > MagickEpsilon)) + (fabs(CurrentContext->pointsize-pointsize) >= MagickEpsilon)) { CurrentContext->pointsize=pointsize; (void) MvgPrintf(wand,"font-size %g\n",pointsize); @@ -5453,7 +5453,7 @@ WandExport MagickBooleanType DrawSetStrokeDashArray(DrawingWand *wand, q=CurrentContext->dash_pattern; for (i=0; i < (ssize_t) n_new; i++) { - if (fabs((*p)-(*q)) > MagickEpsilon) + if (fabs((*p)-(*q)) >= MagickEpsilon) { update=MagickTrue; break; @@ -5532,7 +5532,7 @@ WandExport void DrawSetStrokeDashOffset(DrawingWand *wand, if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if ((wand->filter_off != MagickFalse) || - (fabs(CurrentContext->dash_offset-dash_offset) > MagickEpsilon)) + (fabs(CurrentContext->dash_offset-dash_offset) >= MagickEpsilon)) { CurrentContext->dash_offset=dash_offset; (void) MvgPrintf(wand,"stroke-dashoffset %g\n",dash_offset); @@ -5743,7 +5743,7 @@ WandExport void DrawSetStrokeWidth(DrawingWand *wand,const double stroke_width) if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if ((wand->filter_off != MagickFalse) || - (fabs(CurrentContext->stroke_width-stroke_width) > MagickEpsilon)) + (fabs(CurrentContext->stroke_width-stroke_width) >= MagickEpsilon)) { CurrentContext->stroke_width=stroke_width; (void) MvgPrintf(wand,"stroke-width %g\n",stroke_width);