X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e9ff8157389edec60f1e86bca2139dc0e635ebc..a977709b11432e05af48e205cc02c0a0ad4ecf16:/src/msw/bitmap.cpp?ds=sidebyside diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 99e6867101..3d725cfea2 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -948,7 +948,7 @@ bool wxBitmap::LoadFile(const wxString& filename, long type) wxImage image; if ( image.LoadFile( filename, type ) && image.Ok() ) { - *this = image.ConvertToBitmap(); + *this = wxBitmap(image); return TRUE; } @@ -990,7 +990,7 @@ bool wxBitmap::SaveFile(const wxString& filename, else { // FIXME what about palette? shouldn't we use it? - wxImage image( *this ); + wxImage image = ConvertToImage(); if ( image.Ok() ) { return image.SaveFile(filename, type); @@ -1265,7 +1265,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) // scan the bitmap for the transparent colour and set the corresponding // pixels in the mask to BLACK and the rest to WHITE - COLORREF maskColour = RGB(colour.Red(), colour.Green(), colour.Blue()); + COLORREF maskColour = wxColourToPalRGB(colour); m_maskBitmap = (WXHBITMAP)::CreateBitmap(width, height, 1, 1, 0); HDC srcDC = ::CreateCompatibleDC(NULL);