+ image.Destroy();
+
+ // test image loading from stream
+ wxFile file(dir + _T("horse.bmp"));
+ off_t len = file.Length();
+ void *data = malloc(len);
+ if ( file.Read(data, len) != len )
+ wxLogError(_T("Reading bitmap file failed"));
+ else
+ {
+ wxMemoryInputStream mis(data, len);
+ if ( !image.LoadFile(mis) )
+ wxLogError(wxT("Can't load BMP image from stream"));
+ else
+ my_horse_bmp2 = new wxBitmap( image );
+ }
+
+ free(data);