8.5 Image libraries

When an application uses several bitmaps or photos, it is useful to group all these images into a single file called an image library. Image libraries can be saved to files and loaded later, restoring all images that were stored inside the library. Moreover image libraries files are functors that can be linked to your application so that graphical resources like images can be packaged inside your application binaries.

The function QTk.newImageLibrary returns an empty image library. An image library is an object that implements the following interface:

Image libraries can be also be saved and loaded to files:

Saved image libraries are functors that you can directly import and link into your application's functor. To achieve this, you must do the following:

Compiling your functor now statically includes all the required data for rebuilding the image library, and all the necessary commands for creating a new one from this data. The original image library file is no more needed for the correct execution of your application.

Donatien Grolaux
Version 1.3.0 (20040413)