Fix converting wxBitmap to wxImage (wxGTK2)

Since f7247086c2 ("Fix storing wxBitmap data in GdkPixbuf", 2019-09-18),
919a4ec702 ("Fix drawing wxBitmap with mask", 2019-09-18) and other
commits (see #18498, #18508) RGBA wxBitmaps with masks are drawn properly
under wxGTK2 so only wxBitmap raw RGBA data should be transferred to
wxImage RGBA data because mask is stored in the target wxImage separately.
This commit is contained in:
Artur Wieczorek
2021-04-08 00:02:13 +02:00
parent 5f33a52f49
commit c97bec76b8
2 changed files with 1 additions and 6 deletions

View File

@@ -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))
{