X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/474df218777eae7dade89c094e50e032eb2feeea..876262caf1dd81b0e3d9a0c81c10879f6fb256e8:/src/msw/gdiimage.cpp diff --git a/src/msw/gdiimage.cpp b/src/msw/gdiimage.cpp index 6fa126cdd1..1e7606bcbe 100644 --- a/src/msw/gdiimage.cpp +++ b/src/msw/gdiimage.cpp @@ -355,22 +355,13 @@ bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap, bool wxBMPFileHandler::SaveFile(wxBitmap *bitmap, const wxString& name, int WXUNUSED(type), - const wxPalette *pal) + const wxPalette * WXUNUSED(pal)) { -#if wxUSE_IMAGE_LOADING_IN_MSW - -#if wxUSE_PALETTE - wxPalette *actualPalette = (wxPalette *)pal; - if ( !actualPalette ) - actualPalette = bitmap->GetPalette(); -#else - wxPalette *actualPalette = NULL; -#endif // wxUSE_PALETTE - - return wxSaveBitmap(WXSTRINGCAST name, bitmap, actualPalette) != 0; -#else - return false; -#endif + wxCHECK_MSG( bitmap, false, _T("NULL bitmap in SaveFile") ); + + wxDIB dib(*bitmap); + + return dib.Save(name); } // ----------------------------------------------------------------------------