From 1e4aa463a141257da069a7730bc68746863cd964 Mon Sep 17 00:00:00 2001 From: cristy Date: Mon, 15 Feb 2010 00:04:18 +0000 Subject: [PATCH] --- magick/transform.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/magick/transform.c b/magick/transform.c index 77df1a565..8602dd6a0 100644 --- a/magick/transform.c +++ b/magick/transform.c @@ -559,14 +559,12 @@ MagickExport Image *CropImage(const Image *image,const RectangleInfo *geometry, } if ((unsigned long) (page.x+page.width) > image->columns) page.width=image->columns-page.x; - if (geometry->width != 0) - if (page.width > geometry->width) - page.width=geometry->width; + if ((geometry->width != 0) && (page.width > geometry->width)) + page.width=geometry->width; if ((unsigned long) (page.y+page.height) > image->rows) page.height=image->rows-page.y; - if (geometry->height != 0) - if (page.height > geometry->height) - page.height=geometry->height; + if ((geometry->height != 0) && (page.height > geometry->height)) + page.height=geometry->height; bounding_box.x+=page.x; bounding_box.y+=page.y; if ((page.width == 0) || (page.height == 0)) -- 2.40.0