• Quick Start
  • Booting
  • Platform
  • Portals
  • References
    • API Reference TOI3
    • IIP Reference
  • Resources
ARRIS Enterprises, Inc. Confidential Information

Images

Since memory is a limited resource on an IP-STB, it's very important to figure out a compromise between the amount of memory that the portal uses and an animation speed.

Image formats and size

The different file formats that are supported for images in the KreaTV IP-STB are GIF (including animated GIF), JPEG and PNG.

We recommend PNG over GIF and JPEG because:

  • It has up to 30% more efficient compression.
  • It has more possibilities for different color palettes (true color, grayscale and indexed palette).
  • It has support for alpha channels.
  • It is a free format (no licensing costs).

Images rendered on a page consume much more memory than the compressed image file itself. This is because the image has to be unpacked completely before it is displayed.

Example: a JPEG image is 640x480 pixels big, the file size is 50 KB. This will consume at least 640 * 480 * 4 = 1,200 KiB of memory when rendered since a 32 bit color depth is used.

Use small images whenever possible and scale them bigger using stylesheets. This will not consume any extra memory.

Always avoid using large or full screen images, unless it is explicitly required.

Portal application cache size

Careful testing is required to find the optimal cache size for the portal application. It is a tradeoff between performance and memory usage.

Typical cache sizes range from 1 MiB to 4 MiB, depending on how many images that are being used.

The Portal Application will cache images rendered, that means that the file size of an image does not matter, it will always consume <width> * <height> * 4 bytes of the cache memory.

Hardware accelerated image blits

Image rendering can be hardware accelerated, making it possible to render animations smoothly. Add ?kreatv.gfxmem=true to the end of the image url for accelerated blits.

Hardware accelerated images are placed in graphics memory. Therefore some extra graphics memory must be added in the build configuration. See the graphics configuration for more information about it.

Example


<img src="image.png?kreatv.gfxmem=true" />

5.0.1

Copyright (c) 2016 ARRIS Enterprises, LLC. All Rights Reserved. ARRIS Enterprises, LLC. Confidential Information.