From 7b0fcf1485d2a7ecb0dac689d37e432bfaf6b395 Mon Sep 17 00:00:00 2001 From: cristy Date: Thu, 24 Nov 2011 00:24:07 +0000 Subject: [PATCH] --- coders/pdf.c | 3 ++- coders/ps.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/coders/pdf.c b/coders/pdf.c index a6766911f..27fa31ce2 100644 --- a/coders/pdf.c +++ b/coders/pdf.c @@ -539,7 +539,8 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception) continue; hires_bounds=bounds; } - if ((hires_bounds.x2 != 0.0) && (hires_bounds.y2 != 0.0)) + if ((fabs(hires_bounds.x2-hires_bounds.x1) >= MagickEpsilon) && + (fabs(hires_bounds.y2-hires_bounds.x1) >= MagickEpsilon)) { /* Set PDF render geometry. diff --git a/coders/ps.c b/coders/ps.c index cc75b91de..0299467bf 100644 --- a/coders/ps.c +++ b/coders/ps.c @@ -692,7 +692,8 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception) hires_bounds=bounds; priority=i; } - if (priority != 0) + if ((fabs(hires_bounds.x2-hires_bounds.x1) >= MagickEpsilon) && + (fabs(hires_bounds.y2-hires_bounds.x1) >= MagickEpsilon)) { /* Set Postscript render geometry. -- 2.40.0