[wxPython-users] displaying resized images
Christopher Barker
Chris.Barker at noaa.gov
Wed Jul 19 13:53:47 PDT 2006
justin mcguire wrote:
> ill check that out, in the meantime if anybody has any other sugestions
> the are welcome.
maybe I'm missing something, but this is pretty trivial:
load the image into a wx.Image
I = wx.Image(filename)
resize it
I.Rescale(NewWidth, NewHeight)
turn it into a bitmap
B = wx.BitmapFromImage(I)
put it on the button
Button = wx.BitmapButton(parent, bitmap= B)
presto!
-CHB
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the wxpython-users
mailing list