Note: This CMake API is deprecated. Use the
BoardDefaults.qmlprojectconfig files instead. See QmlProject Manual.
By default, Qt Quick Ultralite would automatically try to choose the optimal pixel format for the image, depending on platform settings and source image's properties.
You could change the image pixel format 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_RESOURCE_CACHE_POLICY 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_RESOURCE_IMAGE_PIXEL_FORMAT set to RGB332 will 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 pixel format 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 pixel format. 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 pixel format for an image.
Requested pixel format for the image must match the image content. For example pixel format RGB888 for the image with alpha channel is not possible.
Possible values are:
The default value is "Automatic".
Pixel formats RGB888RLE, XRGB8888RLE and ARGB888RLE are dedicated to images using the lossless run-length encoding (RLE) compression algorithm. Unlike images using QUL_RESOURCE_COMPRESSION, these images are decoded on the fly during rendering, and thus don't require any additional storage. The limitation is that scales, rotations, shears and perspective transforms are not supported for RLE pixel formats.
AutomaticCompressedLossless allows the resource compiler to automatically choose the pixel format for lossless compression based on the image content (opaque or transparent) and the platform default values (QUL_PLATFORM_DEFAULT_RESOURCE_COMPRESSED_LOSSLESS_PIXEL_FORMAT_OPAQUE or QUL_PLATFORM_DEFAULT_RESOURCE_COMPRESSED_LOSSLESS_PIXEL_FORMAT_ALPHA).
Note: RGB888 is currently implemented in the same way as XRGB8888 (resources are 32-bit).
This property was introduced in Qt Quick Ultralite 2.0.
See also Default Resource Properties.
Available under certain Qt licenses.
Find out more.