From: anthony Date: Fri, 2 Dec 2011 06:15:43 +0000 (+0000) Subject: Fixed incorrect 'delta' increment calculation in Equal tile crop X-Git-Tag: 7.0.1-0~6592 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f61729a2b28174fbe7bba2ec501471390c5b0aac;p=imagemagick Fixed incorrect 'delta' increment calculation in Equal tile crop --- diff --git a/MagickCore/transform.c b/MagickCore/transform.c index bbdfb79b0..7e2021cf8 100644 --- a/MagickCore/transform.c +++ b/MagickCore/transform.c @@ -747,14 +747,8 @@ MagickExport Image *CropImageToTiles(const Image *image, width+=(geometry.x < 0 ? -1 : 1)*geometry.x; height+=(geometry.y < 0 ? -1 : 1)*geometry.y; } - if ((width % geometry.width) != 0) - delta.x=(double) (width+(geometry.width >> 1))/geometry.width; - else - delta.x=(double) width/geometry.width; - if ((height % geometry.height) != 0) - delta.y=(double) (height+(geometry.height >> 1))/geometry.height; - else - delta.y=(double) height/geometry.height; + delta.x=((double)width)/((double)geometry.width); + delta.y=((double)height)/((double)geometry.height); for (offset.y=0; offset.y < (double) height; ) { if ((flags & AspectValue) == 0)