-#if wxUSE_IMAGE
- 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) )
+#if wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB)
+ if ( size != wxDefaultSize &&
+ (bmp.GetWidth() != size.x || bmp.GetHeight() != size.y) )