• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# OH_ImagePackerNative
2
3## Overview
4
5The OH_ImagePackerNative struct describes the image packer, which is used to perform operations related to an image packer.
6
7The 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.
8
9| Field Type| Field Name| Field Description|Operation Function| Function Description|
10| -------- | -------- | -------- | -------- | -------- |
11| OH_ImageSourceNative | imageSource | Image source.| [OH_ImagePackerNative_PackToDataFromImageSource](capi-image-packer-native-h.md#oh_imagepackernative_packtodatafromimagesource) | Encodes an image source into data in a given format.|
12|OH_PixelmapNative | pixelmap | PixelMap at the native layer.| [OH_ImagePackerNative_PackToDataFromPixelmap](capi-image-packer-native-h.md#oh_imagepackernative_packtodatafrompixelmap) | Encodes a PixelMap into data in a given format.|
13|int32_t | imagesourceFd | File descriptor of an image source.| [OH_ImagePackerNative_PackToFileFromImageSource](capi-image-packer-native-h.md#oh_imagepackernative_packtofilefromimagesource) | Encodes an image source into a file.|
14|int32_t | pixelmapFd | File descriptor of a PixelMap.| [OH_ImagePackerNative_PackToFileFromPixelmap](capi-image-packer-native-h.md#oh_imagepackernative_packtofilefrompixelmap) | Encodes a PixelMap into a file.|
15
16To create an OH_ImagePackerNative object, call [OH_ImagePackerNative_Create](capi-image-packer-native-h.md#oh_imagepackernative_create).
17
18To release an OH_ImagePackerNative object, call [OH_ImagePackerNative_Release](capi-image-packer-native-h.md#oh_imagepackernative_release).
19
20**Since**: 12
21
22**Related module**: [Image_NativeModule](capi-image-nativemodule.md)
23
24**Header file**: [image_packer_native.h](capi-image-packer-native-h.md)
25