- int bmp_w = bmp.GetWidth();
- int bmp_h = bmp.GetHeight();
- // want default size but it's smaller, paste into transparent image
- if ((reqSize == wxDefaultSize) &&
- (bmp_h < bestSize.x) && (bmp_w < bestSize.y))
- {
- wxPoint offset((bestSize.x - bmp_w)/2, (bestSize.y - bmp_h)/2);
- wxImage img = bmp.ConvertToImage();
- img.Resize(bestSize, offset);
- bmp = wxBitmap(img);
- }
- else if ( (bmp_w != bestSize.x) || (bmp_h != bestSize.y) )