# pragma hdrstop
#endif
+#if wxUSE_LIBPNG
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
void
ima_png_error(png_struct *png_ptr, char *message)
{
- wxMessageBox(message, "PNG error");
+ wxMessageBox(wxString::FromAscii(message), wxT("PNG error"));
longjmp(png_ptr->jmpbuf, 1);
}
strcpy(nameStr, name);
else
{
- strcpy(nameStr, filename);
- wxStripExtension(nameStr);
+ wxString str = wxString::FromAscii(filename) ;
+ wxStripExtension( str ) ;
+ strcpy(nameStr, str.ToAscii() );
}
if ( GetDepth() > 4 )
int desiredWidth, int desiredHeight)
{
wxPNGReader reader;
- if (reader.ReadFile((char*) (const char*) name))
+ if (reader.ReadFile( (char*)(const char*) name.ToAscii() ) )
{
return reader.InstantiateBitmap(bitmap);
}
return FALSE;
}
-
+#endif //wxUSE_LIBPNG