Fixed rescaling wxBitmap.
Create rescaled wxBitmap with the same colour depth as the source bitmap.
This commit is contained in:
parent
5b2724c900
commit
2072bfa00e
@ -222,7 +222,7 @@ void wxArtProvider::RescaleBitmap(wxBitmap& bmp, const wxSize& sizeNeeded)
|
||||
bmp = wxBitmap(img);
|
||||
#else // !wxUSE_IMAGE
|
||||
// Fallback method of scaling the bitmap
|
||||
wxBitmap newBmp(sizeNeeded);
|
||||
wxBitmap newBmp(sizeNeeded, bmp.GetDepth());
|
||||
#if defined(__WXMSW__) || defined(__WXOSX__)
|
||||
// wxBitmap::UseAlpha() is used only on wxMSW and wxOSX.
|
||||
newBmp.UseAlpha(bmp.HasAlpha());
|
||||
|
@ -945,7 +945,7 @@ static void RescaleBitmap(wxBitmap& bmp, const wxSize& sizeNeeded)
|
||||
bmp = wxBitmap(img);
|
||||
#else // !wxUSE_IMAGE
|
||||
// Fallback method of scaling the bitmap
|
||||
wxBitmap newBmp(sizeNeeded);
|
||||
wxBitmap newBmp(sizeNeeded, bmp.GetDepth());
|
||||
#if defined(__WXMSW__) || defined(__WXOSX__)
|
||||
// wxBitmap::UseAlpha() is used only on wxMSW and wxOSX.
|
||||
newBmp.UseAlpha(bmp.HasAlpha());
|
||||
|
Loading…
Reference in New Issue
Block a user