Chris' wxImage::SaveFile(filename_only) patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -938,6 +938,24 @@ bool wxImage::LoadFile( const wxString& filename, const wxString& mimetype, int
|
||||
#endif // wxUSE_STREAMS
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool wxImage::SaveFile( const wxString& filename ) const
|
||||
{
|
||||
wxString ext = filename.AfterLast('.').Lower();
|
||||
|
||||
wxImageHandler * pHandler = FindHandler(ext, -1);
|
||||
if (pHandler)
|
||||
{
|
||||
SaveFile(filename, pHandler->GetType());
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
wxLogError(_("Can't save image to file '%s': unknown extension."), filename.c_str());
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxImage::SaveFile( const wxString& filename, int type ) const
|
||||
{
|
||||
#if wxUSE_STREAMS
|
||||
|
Reference in New Issue
Block a user