diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index a1eb51a48e..0d8e35e7e0 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -836,7 +836,7 @@ wxImage wxBitmap::ConvertToImage() const // prefer pixbuf if available, it will preserve alpha and should be quicker if (HasPixbuf()) { - GdkPixbuf *pixbuf = GetPixbuf(); + GdkPixbuf *pixbuf = GetPixbufNoMask(); unsigned char* alpha = NULL; if (gdk_pixbuf_get_has_alpha(pixbuf)) { diff --git a/tests/graphics/bitmap.cpp b/tests/graphics/bitmap.cpp index d555ec395e..ef2127067a 100644 --- a/tests/graphics/bitmap.cpp +++ b/tests/graphics/bitmap.cpp @@ -318,10 +318,6 @@ TEST_CASE("BitmapTestCase::ToImage", "[bitmap][image][convertto]") } } -#if defined(__WXGTK20__) && !defined(__WXGTK3__) - // Bitmaps with both alpha and a mask don't work well in wxGTK2 so skip the test in this case. - WARN("Skipping test known not to work in wxGTK2."); -#else SECTION("RGBA bitmap with mask") { // RGBA Bitmap @@ -436,7 +432,6 @@ TEST_CASE("BitmapTestCase::ToImage", "[bitmap][image][convertto]") } CHECK(unmaskedPixelsCount == numUnmaskedPixels); } -#endif // !__WXGTK20__ } TEST_CASE("BitmapTestCase::FromImage", "[bitmap][image][convertfrom]")