[Qt-interest] How can I read a large image fastly?

Jason H scorp1us at yahoo.com
Thu Feb 4 18:22:01 CET 2010


1, there is no way around time. Loading is loading. Unless you want to write a custom loader that will seek to the file's specific pixels, but this only works for bitmaps. JPG, etc, cannot be partially loaded (unless they are saved as progressive)

2, 
http://labs.trolltech.com/blogs/2009/01/20/50-scaling-of-argb32-image/
http://labs.trolltech.com/blogs/2009/01/26/creating-thumbnail-preview/
" Check the example at Graphics Dojo 
repository under the subdirectory thumbview."


----- Original Message ----
From: Kermit Mei <kermit.mei at gmail.com>
To: Jason H <scorp1us at yahoo.com>
Cc: qt-interest <qt-interest at trolltech.com>
Sent: Thu, February 4, 2010 9:30:02 AM
Subject: Re: [Qt-interest] How can I read a large image fastly?

Jason H wrote:
> You can;t speed loading, but you can load it into memory then use QPixmap::copy() to access/scale,etc only the visible area.
> 
> 
> Or are you trying to scale the thing in entirety?
> There are a couple scaling algorithms. Also avoid use of SmoothPixmapTransform,as you'll be doing sub-pixel interpolation.
>  
<snip>

Dear Jason,
     Would you like to give me more details about it? I don't know how to deal with it as what you told me to.
For example:
1.How to load it in memory first? QPixmap::load() ? This is more slower then QImage::load().

2.What "scaling algorithms"  should I use?

Thanks.
B.R
Kermit


      




More information about the Qt-interest-old mailing list