]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 25 Jan 2012 23:06:43 +0000 (23:06 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 25 Jan 2012 23:06:43 +0000 (23:06 +0000)
coders/pdf.c
coders/ps.c

index 98a8dec15caeba218c5ca384ab3e8052b353d64a..f90d6da7806b613ec586f2b62fb1b28e1f23de84 100644 (file)
@@ -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;
index 4448b3b7a8523f3765af2e0b71d39401771deebb..09294209fa73f9c0567f0e8bacb6ac14075919ff 100644 (file)
@@ -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;
   }