By default, Qt Quick Ultralite would automatically try to choose the optimal color depth for the image, depending on platform settings and source image's properties.
You could change the image color depth to balance between the image output quality, its binary size, and memory footprint of your application.
Although the image quality is better with a higher bit depth, such an image requires more data to be stored in the application binary. This affects your device flash usage, and also the RAM consumption depending on the QUL_COPY_TO_RAM settings. On the other hand, using a lower bit depth results in worse image quality, but has little impact on the binary size and memory footprint.
Note: An image with QUL_IMAGE_COLOR_DEPTH set to 8 is not be rendered using hardware-acceleration on any Qt Quick Ultralite reference platforms. This may result in sub-optimal application performance in terms of rendering speed (number of frames per second).
With the introduction of the SpriteLayer, ImageLayer and ItemLayer API in Qt Quick Ultralite 1.7, it might be necessary to select a color depth for an image depending on which layer it's meant to be used with.
On certain platforms (such as RH850), sprite layers require that all the contained item and image layer have a compatible color depth.
And also when an opaque image is intended to be shown in a 16-bit item layer it might be a waste to use 32-bit color depth for the image.
This property enables setting the preferred color depth for an image.
The final color depth for image may vary depending on the image content. This means, you may not always get the requested color depth. For example, a color depth of 8 for an image with alpha channel is not possible. In such a case, Qt Quick Ultralite implicitly selects an optimal color depth (which is 16 for earlier example) that allows storing alpha channel information.
Possible values are 8, 16, 32, and "Automatic". The default value is "Automatic".
This property was introduced in Qt Quick Ultralite 1.7.
See also Default Resource Properties.
Available under certain Qt licenses.
Find out more.