# if !defined USE_CAIRO && defined HAVE_XRENDER
/* Picture versions of pixmap and mask for compositing. */
Picture picture, mask_picture;
+
+ /* We need to store the original image dimensions in case we have to
+ call XGetImage. */
+ int original_width, original_height;
# endif
#endif /* HAVE_X_WINDOWS */
#ifdef HAVE_NTGUI
# if !defined USE_CAIRO && defined HAVE_XRENDER
if (!img->picture)
return;
+
+ /* Store the original dimensions as we'll overwrite them later. */
+ img->original_width = img->width;
+ img->original_height = img->height;
# endif
/* Determine size. */
if (ximg_in_img)
return ximg_in_img;
+#ifdef HAVE_XRENDER
+ else if (img->picture)
+ return XGetImage (FRAME_X_DISPLAY (f), !mask_p ? img->pixmap : img->mask,
+ 0, 0, img->original_width, img->original_height, ~0, ZPixmap);
+#endif
else
return XGetImage (FRAME_X_DISPLAY (f), !mask_p ? img->pixmap : img->mask,
0, 0, img->width, img->height, ~0, ZPixmap);