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

Sean Harmer sean.harmer at maps-technology.com
Thu Feb 4 20:46:11 CET 2010


Hi,

On Thursday 04 February 2010 12:47:44 Kermit Mei wrote:
> Hello community!
> 
>      I run Qt on a slow embedded device, now we want to show some large
> image on it, but the speed of loading is too slowly. For example, if we
> decode a 6M jpg picture, we always need 100s to show it.
> 
>     Does Qt4 can support that  read  parts of  the  image to make it
> shows quickly. For example, the picture is 4000x4000,  in fact we just
> need to show 320x240. Can I just show a part of the picture to make it
> faster?

So why not just rescale the image offline and store the result as a second 
320x240 image that can be loaded quickly by your application? You have not 
given any good reason for doing the loading of a large image and applying 
scaling at runtime of your application. So unless you have such a reason just 
prepare your small image as a pre-process step.

Sean



More information about the Qt-interest-old mailing list