362 views
in GUI Development by
Is there a way to reduce the loading time of bitmap resources within an UI application?

1 Answer

0 votes
by
In general the bitmap resources are stored in compressed format and need to be uncompressed and loaded into the RAM when they are used during runtime. The bigger the bitmap is the longer this loading time will take. The loading time depends as well strongly on the memory and bus performance of the target platform. As long as the resource is referenced from an object, it will not be released by the Garbage Collector.

To avoid long loading time at the moment you want to show the image on the screen, you can load the image in advance and hold it invisible in the background. Just assign the bitmap resource to a dummy object Views::Image in your application class and set the property 'Visible' of this image to 'false'. In this case the bitmap will be loaded at the moment when your application class is created. Then the bitmap remains loaded in the RAM because it is referenced from the application object. Of course, this solution costs permanently memory but it saves the loading time when the image gets displayed.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...