目录

About This Kit

Image Kit provides APIs for you to decode, encode, edit, and receive images, and to process image metadata.

Highlights

Basic Concepts

Be familiar with the following basic concepts before development:

How to Use

Image Kit provides rich image processing capabilities that developers can use flexibly as needed. You can either use the complete workflow of image decoding, editing and processing, and encoding, or directly pass the decoded PixelMap to the Image component for display without further processing. Rich option parameters are available during decoding and encoding to meet the requirements of various development scenarios.

Image Kit supports PixelMap operations on the decoded PixelMap to process part of the target image. It also supports image transformations, allowing you to crop, scale, offset, rotate, flip, and set the opacity for an image.

Image Kit supports adding filter effects to images through ImageEffect.

Image Kit also provides the capability to read and edit image EXIF data. You can obtain and configure additional attributes in image files, such as basic image information like width, height, and rotation direction, photography parameters like aperture and focal length, and GPS information like longitude and latitude.

The image decoding and encoding processes are shown in Figure 1 and Figure 2. The PixelMap obtained after decoding can be directly used for image display, editing, and processing.

Figure 1 Image decoding process

Figure 2 Image encoding process

Constraints

Emulator Support

This kit supports the Emulator, but there are some differences in feature support between real devices and the Emulator: