We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Image Development Overview

The image framework provides the image encoding and decoding capabilities. It also provides support for the Image component and the Gallery application. The decoding result can be sent to the Image component for display.

Image development is the process of parsing, processing, and constructing image pixel data to achieve the required image effect. Image development mainly involves image decoding and encoding.

Before image development, be familiar with the following basic concepts:

  • Image Decoding

    The operation of decoding an archived image in a supported format into a pixel map for image display or processing. Currently, the following image formats are supported: JPEG, PNG, GIF, RAW, WebP, BMP, and SVG.

  • PixelMap

    A bitmap that is not compressed after decoding. It is used for image display.

  • Image encoding

    The operation of encoding a pixel map into an archived image in different formats (only in JPEG, WebP, and PNG currently) for subsequent processing, such as storage and transmission.

    The figure below illustrates the image development process.

    Figure 1 Image development process

  1. Image retrieval: Obtain a raw image through the application sandbox.

  2. Instance creation: Create an ImageSource instance, which is the source class of decoded images and is used to obtain or modify image information.

  3. Image decoding: Decode the image source to generate a pixel map.

  4. PixelMap: uncompressed bitmap after image decoding.

  5. Image encoding: Use the ImagePacker class to compress and encode the pixel map or image source to generate a new image.