Png images
-
The final size of the executable is 1198462 bytes.
Target has 64 Mb of RAM.
Not yet tested when not compiled in to application.
Number of png's in qrc file : 170! -
[quote author="ZapB" date="1305897728"]If you are targeting a particular device it is pointless to rescale the images at runtime over and over again. Much better idea to rescale them once offline and use the rescaled images directly.[/quote]
Agree. Different device, different resolution.
-
Just to be sure my reasoning is right :
One of the images is 25Kb in size. If I open that image, the size is 3289x1385 pixels. So, if we have to rescale that, the app has to load the original image in memory meaning consuming 3289x1385x3 = 13,66Mb of RAM (if I assume 24 bits per pixel). Right ? -
The screen resolution of the target is 800x480 !
Well, it's clear that this way of working is not a good choice at all... it looks like the application will need some rework...
Resizing the images once to their correct size will certainly resolve the "out of memory" problem...Thanks !
-
The app should not need much reworking if it is already using the larger images. You just need to spend a little time in your favourite image editor rescaling the png's to more suitable sizes. Another bonus is that yoru app will load faster (since it will be smaller) and it will also display the images faster since there will be no slow software scaling to be performed.
-
Stupid remark of me...! Of course, app should normally not change one byte... only scale images.
-
- Imaging scaling is very expensive and memory constrained in low memory devices like handhelds.
- Why don't you use svg instead of png. They scale to the target resolution and work like a charm in low memory targets.
- If you still prefer to use png files, please scale it yourself and provide an image cache that resides on the disk rather than on RAM. If you downscale try doing a "cheat scale":http://labs.qt.nokia.com/2009/01/26/creating-thumbnail-preview/