C

ImageFiles.MCU.resourceCompression

Stores image assets in compressed format to enable faster access. This property is set to false by default.

Description

This property can be used to either enable or disable the resource compresion. using true or false. The resource compression is set to false by default.

If the resource compression is enabled, the image assets are stored in compressed format and decompressed into the cache when needed. This reduces the size of the binary but adds decompression overhead. When this flag is true, it implies that ImageFiles.MCU.resourceCachePolicy is set to "OnDemand".

Notes:

  • The LodePNG decompression library is linked into the binary if compression is enabled for any asset.
  • Image caching must be enabled.

Usage

This property is accepted in any context where its parent node is accepted. It takes a boolean value, and the default value is false.

Code example:

ImageFiles {
    MCU.resourceCompression: true
}

Note: This property can also be applied to every image resource in the QmlProject file if defined in MCU.Config as follows:

MCU.Config {
    resourceCompression: true
}

Since

This property was introduced in QmlProject API 1.3 .

See also Qt Quick Ultralite image caching, ImageFiles.MCU.resourceCachePolicy, MCU.Config.maxResourceCacheSize, and QUL_RESOURCE_COMPRESSION.

Available under certain Qt licenses.
Find out more.