Mike Driscoll wrote:
Check out Andrea's and Peter's ThumbnailCtrl: http://xoomer.alice.it/infinity77/main/ThumbnailCtrl.html
Which is nice, but I"m not sure it would solve the OP's problem.
I suspect that it takes a while to load up the entire image, then convert it to a thumbnail.
With jpeg, is is possible to load up a lower resolution image without loading the whole thing. Essentially, what you can do is load just the average value for each 8x8 pixel block -- a trick that takes advantage of how jpeg is compressed.
I doubt wx supports this, but PIL (or another image processing tool for Python) might.
Otherwise, what you would do ideally is cache the thumbnails somewhere, so you don't need to re-create them each time the app is used.
image = wx.Image(name, wx.BITMAP_TYPE_JPEG)
scaledImage = Scale(image, sizeX, sizeY)
Where does this "Scale" function from from? You might try:
scaledImage = image.Scale(sizeX, sizeY)
or
scaledImage = image.Scale(sizeX, sizeY, wx.IMAGE_QUALITY_HIGH)
-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
Chris.Barker@noaa.gov