From: cristy Date: Wed, 25 Jan 2012 23:06:43 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6307 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad29a8c434b5dce31ba45874137bccf3c1f4b4ce;p=imagemagick --- diff --git a/coders/pdf.c b/coders/pdf.c index 98a8dec15..f90d6da78 100644 --- a/coders/pdf.c +++ b/coders/pdf.c @@ -537,7 +537,7 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception) } if (count != 4) continue; - if ((fabs(bounds.x2-bounds.x1) <= fabs(hires_bounds.x2-hires_bounds.x1)) && + if ((fabs(bounds.x2-bounds.x1) <= fabs(hires_bounds.x2-hires_bounds.x1)) || (fabs(bounds.y2-bounds.y1) <= fabs(hires_bounds.y2-hires_bounds.y1))) continue; hires_bounds=bounds; diff --git a/coders/ps.c b/coders/ps.c index 4448b3b7a..09294209f 100644 --- a/coders/ps.c +++ b/coders/ps.c @@ -689,6 +689,9 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception) } if ((count != 4) || (i < (ssize_t) priority)) continue; + if ((fabs(bounds.x2-bounds.x1) <= fabs(hires_bounds.x2-hires_bounds.x1)) || + (fabs(bounds.y2-bounds.y1) <= fabs(hires_bounds.y2-hires_bounds.y1))) + continue; hires_bounds=bounds; priority=i; }