X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3727c043a846bed24554c47b723da9fbe3b9a010..2cfcf22d47b7d9cf3c85edfe498c5f23a18a9a19:/src/stc/gen_iface.py diff --git a/src/stc/gen_iface.py b/src/stc/gen_iface.py index 9a6c188200..4e0afbb129 100644 --- a/src/stc/gen_iface.py +++ b/src/stc/gen_iface.py @@ -203,6 +203,8 @@ methodOverrideMap = { // convert bmp to a xpm in a string wxMemoryOutputStream strm; wxImage img = bmp.ConvertToImage(); + if (img.HasAlpha()) + img.ConvertAlphaToMask(); img.SaveFile(strm, wxBITMAP_TYPE_XPM); size_t len = strm.GetSize(); char* buff = new char[len+1]; @@ -299,6 +301,8 @@ methodOverrideMap = { // convert bmp to a xpm in a string wxMemoryOutputStream strm; wxImage img = bmp.ConvertToImage(); + if (img.HasAlpha()) + img.ConvertAlphaToMask(); img.SaveFile(strm, wxBITMAP_TYPE_XPM); size_t len = strm.GetSize(); char* buff = new char[len+1];