OH_ImagePackerNative

typedef struct OH_ImagePackerNative OH_ImagePackerNative

Overview

The struct describes the image packer, which is used to perform operations related to an image packer.

The struct cannot be directly operated. Instead, its fields must be operated by calling functions. The table below describes the content and operation mode of the OH_ImageNative struct.

Field Type Field Name Field Description Operation Function Function Description
OH_ImageSourceNative imageSource Image source. OH_ImagePackerNative_PackToDataFromImageSource Encodes an image source into data in a given format.
OH_PixelmapNative pixelmap PixelMap at the native layer. OH_ImagePackerNative_PackToDataFromPixelmap Encodes a PixelMap into data in a given format.
int32_t imagesourceFd File descriptor of an image source. OH_ImagePackerNative_PackToFileFromImageSource Encodes an image source into a file.
int32_t pixelmapFd File descriptor of a PixelMap. OH_ImagePackerNative_PackToFileFromPixelmap Encodes a PixelMap into a file.

To create an OH_ImagePackerNative object, call OH_ImagePackerNative_Create.

To release an OH_ImagePackerNative object, call OH_ImagePackerNative_Release.

Since: 12

Related module: Image_NativeModule

Header file: image_packer_native.h