What do you want it do to if you pick an image of a different size? In
my image viewer, I just do this:
bmp = wx.Image( sel, mappings[ext] ).ConvertToBitmap()
sz = (bmp.GetWidth(), bmp.GetHeight())
self.img.SetSize( sz )
self.img.SetBitmap( bmp )
self.imgpanel.SetVirtualSize( sz )
"sel" is the selected file name, "ext" is the extension from the file,
and "mapping" is a dictionary that maps the extension to a
wx.BITMAP_TYPE_XXXX. The imgpanel is a wx.ScrolledWindow, which lets me
handle images larger than the window.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
Here's an example app that does what you want:
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception