- image.LoadFile( dir + wxString("horse.png"), wxBITMAP_TYPE_PNG );
- my_horse = new wxBitmap( image.ConvertToBitmap() );
+ if ( !image.SaveFile( dir + wxString("test.png"), wxBITMAP_TYPE_PNG ) )
+ wxLogError("Can't save file");
+
+ if ( !image.LoadFile( dir + wxString("horse.png"), wxBITMAP_TYPE_PNG ) )
+ wxLogError("Can't load PNG image");
+ else
+ my_horse_png = new wxBitmap( image.ConvertToBitmap() );
+
+ if ( !image.LoadFile( dir + wxString("horse.jpg"), wxBITMAP_TYPE_JPEG ) )
+ wxLogError("Can't load JPG image");
+ else
+ my_horse_jpeg = new wxBitmap( image.ConvertToBitmap() );
+
+ if ( !image.LoadFile( dir + wxString("horse.gif"), wxBITMAP_TYPE_GIF ) )
+ wxLogError("Can't load GIF image");
+ else
+ my_horse_gif = new wxBitmap( image.ConvertToBitmap() );
+
+ if ( !image.LoadFile( dir + wxString("horse.bmp"), wxBITMAP_TYPE_BMP ) )
+ wxLogError("Can't load BMP image");
+ else
+ my_horse_bmp = new wxBitmap( image.ConvertToBitmap() );