]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 12 Oct 2013 01:03:29 +0000 (01:03 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 12 Oct 2013 01:03:29 +0000 (01:03 +0000)
MagickCore/xwindow.c

index 4f2f6ff062358356cdfde5156b308eaa46ea21ed..ad0449c6817e55ce9237d568cb4bf6a74c13b775 100644 (file)
@@ -5516,10 +5516,20 @@ MagickPrivate MagickBooleanType XMakeImage(Display *display,
             Resize image.
           */
           resize_image=NewImageList();
-          if (window->pixel_info->colors != 0)
-            resize_image=SampleImage(window->image,width,height,exception);
+          if ((window->pixel_info->colors == 0) &&
+              (window->image->rows > (unsigned long) XDisplayHeight(display,window->screen)) &&
+              (window->image->columns > (unsigned long) XDisplayWidth(display,window->screen)))
+              resize_image=ResizeImage(window->image,width,height,
+                image->filter,exception);
           else
-            resize_image=ThumbnailImage(window->image,width,height,exception);
+            {
+              if (window->image->storage_class == PseudoClass)
+                resize_image=SampleImage(window->image,width,height,
+                  exception);
+              else
+                resize_image=ThumbnailImage(window->image,width,height,
+                  exception);
+            }
           if (resize_image != (Image *) NULL)
             {
               if (window->image != image)