+ #if wxUSE_IMAGE
+ // Here we use high-quality wxImage scaling functions available
+ wxImage img = bmp.ConvertToImage();
+ double scaleY = (double)maxSz.y / (double)imSz.y;
+ img.Rescale(wxRound(bmp.GetWidth()*scaleY),
+ wxRound(bmp.GetHeight()*scaleY),
+ wxIMAGE_QUALITY_HIGH);
+ wxBitmap* bmpNew = new wxBitmap(img, 32);
+ #else
+ // This is the old, deprecated method of scaling the image