Fix setting alpha flag of wxBitmap created from HBITMAP
If HBITMAP represents 32-bit bitmap we need to check if this is a bitmap with transparency (ARGB) or maybe RGB only (0RBG) and set alpha flag accordingly. Closes #18798.
This commit is contained in:
parent
23c7805742
commit
34fd2bc030
1 changed files with 1 additions and 0 deletions
|
|
@ -1352,6 +1352,7 @@ bool wxBitmap::InitFromHBITMAP(WXHBITMAP bmp, int width, int height, int depth)
|
|||
GetBitmapData()->m_width = width;
|
||||
GetBitmapData()->m_height = height;
|
||||
GetBitmapData()->m_depth = depth;
|
||||
GetBitmapData()->m_hasAlpha = (depth == 32) && CheckAlpha(bmp);
|
||||
|
||||
return IsOk();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue