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)