added wxDIB::Save() and wxDIB to/from wxBitmap) conversions, use them instead of the old C functions (the latter were removed, there is no old code left any more)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||
wxCHECK_MSG( bitmap, false, _T("NULL bitmap in SaveFile") );
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
wxPalette *actualPalette = (wxPalette *)pal;
|
||||
if ( !actualPalette )
|
||||
actualPalette = bitmap->GetPalette();
|
||||
#else
|
||||
wxPalette *actualPalette = NULL;
|
||||
#endif // wxUSE_PALETTE
|
||||
wxDIB dib(*bitmap);
|
||||
|
||||
return wxSaveBitmap(WXSTRINGCAST name, bitmap, actualPalette) != 0;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
return dib.Save(name);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user