def resize_bitmap(parent, _bitmap, target_height):
 image = wx.ImageFromBitmap(_bitmap)
 (_width, _height) = image.GetSize()
 if (_height < target_height):
  return wx.StaticBitmap(parent, (-1), wx.BitmapFromImage(image))
 ratio = (float(_width) / _height)
 image = image.Scale((target_height * ratio), target_height, wx.IMAGE_QUALITY_HIGH)
 return wx.StaticBitmap(parent, (-1), wx.BitmapFromImage(image))

def resize_bitmap ( parent , _bitmap , target_height ) : image = wx . ImageFromBitmap ( _bitmap ) ( _width , _height ) = image . GetSize ( ) if ( _height < target_height ) : return wx . StaticBitmap ( parent , ( - 1 ) , wx . BitmapFromImage ( image ) ) ratio = ( float ( _width ) / _height ) image = image . Scale ( ( target_height * ratio ) , target_height , wx . IMAGE_QUALITY_HIGH ) return wx . StaticBitmap ( parent , ( - 1 ) , wx . BitmapFromImage ( image ) )
resizes a bitmap to a height of 89 pixels .