summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
index a0ef3815d..8d3ba61e1 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
@@ -527,13 +527,14 @@ int Fl_GDI_Printer_Graphics_Driver::draw_scaled(Fl_Image *img, int XP, int YP, i
int Fl_GDI_Graphics_Driver::draw_scaled(Fl_Image *img, int XP, int YP, int WP, int HP) {
Fl_RGB_Image *rgb = img->as_rgb_image();
if (!rgb || !rgb->array) return 0; // for bitmaps and pixmaps
+ if ((rgb->d() % 2) == 0 && !can_do_alpha_blending()) return 0;
if (!*Fl_Graphics_Driver::id(rgb)) *Fl_Graphics_Driver::id(rgb) = (fl_uintptr_t)build_id(rgb,
(void**)(Fl_Graphics_Driver::mask(rgb)));
HDC new_gc = CreateCompatibleDC(gc_);
int save = SaveDC(new_gc);
SelectObject(new_gc, (HBITMAP)*Fl_Graphics_Driver::id(rgb));
- if ((img->d() % 2) == 0 && can_do_alpha_blending()) {
+ if ( (rgb->d() % 2) == 0 ) {
alpha_blend_(XP, YP, WP, HP, new_gc, 0, 0, rgb->w(), rgb->h());
} else {
SetStretchBltMode(gc_, HALFTONE);