[Qt-interest] Fast Scaling of Images
Joshua Grauman
jnfo-c at grauman.com
Fri Apr 15 19:32:11 CEST 2011
Hello all,
I'd like to include a simple image viewer in my application to view
several pngs (around 2000 x 3000 resolution), viewed roughly full screen
(ie. 1000 x 700 or so). I'd like to user to be able to zoom in/out and
pan/scroll. I've seen some examples that simply use a QScrollArea with a
QLabel to display the image. This works fine for me, but I was wondering
if there might be a better method that would scale the images faster so
that zoom in/out would be smoother. The examples I've seen simply use
QLabel::resize() to do the scaling. Is this about as good as I'll get, or
would there be a noticably faster method (reimplementing QPaintEvent??)?
Obviously, I could cache several zoom sizes when each image is loaded, I'm
still thinking if that would be worth it. For now I'm just seeing if there
is a significantly faster method for doing the actual zooming than via
QLabel::resize(). Thoughts? Thanks!
Josh
More information about the Qt-interest-old
mailing list