#include "wx/imagxpm.h"
#include "wx/wfstream.h"
#include "wx/xpmdecod.h"
+#include "wx/filename.h"
IMPLEMENT_DYNAMIC_CLASS(wxXPMHandler,wxImageHandler)
wxXPMDecoder decoder;
wxImage img = decoder.ReadFile(stream);
- if ( !img.Ok() )
+ if ( !img.IsOk() )
return false;
*image = img;
return true;
wxString sName;
if ( image->HasOption(wxIMAGE_OPTION_FILENAME) )
{
- wxSplitPath(image->GetOption(wxIMAGE_OPTION_FILENAME),
- NULL, &sName, NULL);
+ wxFileName::SplitPath(image->GetOption(wxIMAGE_OPTION_FILENAME),
+ NULL, &sName, NULL);
sName << wxT("_xpm");
}
{
wxXPMDecoder decoder;
return decoder.CanRead(stream);
+ // it's ok to modify the stream position here
}
#endif // wxUSE_STREAMS