imageOK = FALSE;
}
-wxPNGReader::wxPNGReader ( char* ImageFileName )
+wxPNGReader::wxPNGReader ( wxChar* ImageFileName )
{
imageOK = FALSE;
filetype = 0;
return mask;
}
-bool wxPNGReader::ReadFile(char * ImageFileName)
+bool wxPNGReader::ReadFile(wxChar * ImageFileName)
{
int number_passes;
if (ImageFileName)
- strcpy(filename, ImageFileName);
+ wxStrcpy(filename, ImageFileName);
FILE *fp;
png_struct *png_ptr;
wxPNGReaderIter iter(this);
/* open the file */
- fp = fopen(filename, "rb");
+ fp = fopen(wxConvFile.cWX2MB(filename), "rb");
if (!fp)
return FALSE;
/* write a png file */
-bool wxPNGReader::SaveFile(char * ImageFileName)
+bool wxPNGReader::SaveFile(wxChar * ImageFileName)
{
if (ImageFileName)
- strcpy(filename, ImageFileName);
+ wxStrcpy(filename, ImageFileName);
wxPNGReaderIter iter(this);
FILE *fp;
png_info *info_ptr;
/* open the file */
- fp = fopen(filename, "wb");
+ fp = fopen(wxConvFile.cWX2MB(filename), "wb");
if (!fp)
return FALSE;
}
-bool wxPNGReader::SaveXPM(char *filename, char *name)
+bool wxPNGReader::SaveXPM(wxChar *filename, wxChar *name)
{
- char nameStr[256];
+ wxChar nameStr[256];
if ( name )
- strcpy(nameStr, name);
+ wxStrcpy(nameStr, name);
else
{
- strcpy(nameStr, filename);
+ wxStrcpy(nameStr, filename);
wxStripExtension(nameStr);
}
if ( !GetPalette() )
return FALSE;
- ofstream str(filename);
+ ofstream str(wxConvFile.cWX2MB(filename));
if ( str.bad() )
return FALSE;
int desiredWidth, int desiredHeight)
{
wxPNGReader reader;
- if (reader.ReadFile((char*) (const char*) name))
+ if (reader.ReadFile(WXSTRINGCAST name))
{
return reader.InstantiateBitmap(bitmap);
}