From ad29a8c434b5dce31ba45874137bccf3c1f4b4ce Mon Sep 17 00:00:00 2001 From: cristy Date: Wed, 25 Jan 2012 23:06:43 +0000 Subject: [PATCH] --- coders/pdf.c | 2 +- coders/ps.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.50.1