From: cristy Date: Fri, 16 Sep 2011 01:37:07 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6998 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=faf4955bcd797a52af8d943944b2610b4737743c;p=imagemagick --- diff --git a/MagickCore/transform.c b/MagickCore/transform.c index e87b40bf7..02a5c33e9 100644 --- a/MagickCore/transform.c +++ b/MagickCore/transform.c @@ -716,12 +716,12 @@ MagickExport Image *CropImage(const Image *image,const RectangleInfo *geometry, % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% CropImageToTiles() will crop a single image, into a possible list of tiles. +% CropImageToTiles() crops a single image, into a possible list of tiles. % This may include a single sub-region of the image. This basically applies % all the normal geometry flags for Crop. % -% Image *CropImageToTiles(const Image *image,const RectangleInfo -% *crop_geometry, ExceptionInfo *exception) +% Image *CropImageToTiles(const Image *image, +% const RectangleInfo *crop_geometry, ExceptionInfo *exception) % % A description of each parameter follows: % @@ -795,8 +795,8 @@ MagickExport Image *CropImageToTiles(const Image *image, width+=(geometry.x < 0 ? -1 : 1)*geometry.x; height+=(geometry.y < 0 ? -1 : 1)*geometry.y; } - delta.x=(double) width/geometry.width; - delta.y=(double) height/geometry.height; + delta.x=(double) (width+geometry.width >> 1)/geometry.width; + delta.y=(double) (height+geometry.height >> 1)/geometry.height; for (offset.y=0; offset.y < (double) height; ) { if ((flags & AspectValue) == 0)