SHIP:Property:image:decodepolicy

From Serious Documentation
Jump to: navigation, search

Node: image

Property Data Type Description
decodepolicy** decodepolicy Directs when an image is decompressed prior to cargo creation or at runtime.

**The decodepolicy property cannot be referenced in scripts.

Images are typically compressed at build time using a lossless compression system to save space in the SIM. At some point the image must be decoded before display, since an LCD display is a flat uncompressed bitmap frame buffer.

The decodepolicy setting controls when this image is decompressed to a "flat" image without compression. There are three options:

  1. DECODE_ONBUILD - decode this image to a flat image during the SHIPTide build process; this creates the largest files but can be displayed directly from the file to the LCD without any decompression. This setting should be used sparsely to keep memory requirements for images manageable.
  2. DECODE_ONLOAD - if/when the images is loaded into DRAM (see preloadpolicy), decode the image at that time. This setting should only be used for images that require high performance rendering as flattened images in DRAM require significant memory
  3. DECODE_ONUSE - leave the image encoded/compressed until the display/render process and on-the-fly decode it. This setting is most memory efficient for a small runtime rendering penalty.

The default, if not set, is DECODE_ONUSE.