harmony 鸿蒙image_packer_mdk.h
image_packer_mdk.h
Overview
The image_packer_mdk.h file declares the APIs used to pack an image or a PixelMap into a buffer or file.
The packing process is as follows:
Call OH_ImagePacker_Create to create an ImagePacker object.
Call OH_ImagePacker_InitNative to convert the ImagePacker object to an ImagePacker_Native object.
Call OH_ImagePacker_PackToData or OH_ImagePacker_PackToFile to pack the source into the target area with the specified packing options.
Call OH_ImagePacker_Release to release an ImagePacker_Native object.
Library: libimage_packer_ndk.z.so
File to include: <multimedia/image_framework/image_packer_mdk.h>
System capability: SystemCapability.Multimedia.Image
Since: 11
Related module: Image
Summary
Structs
Name | Description |
---|---|
struct ImagePackerOpts | Defines the image packing options. |
Types
Name | Description |
---|---|
typedef struct ImagePackerNative ImagePacker_Native | Defines the ImagePacker instance at the native layer. |
typedef struct ImagePackerOpts ImagePacker_Opts | Defines the alias of the image packing options. |
Functions
Name | Description |
---|---|
int32_t OH_ImagePacker_Create (napi_env env, napi_value *res) | Obtains an ImagePacker object at the JavaScript native layer. |
ImagePacker_Native * OH_ImagePacker_InitNative (napi_env env, napi_value packer) | Converts an ImagePacker object at the JavaScript native layer into an ImagePacker_Native object. |
int32_t OH_ImagePacker_PackToData (ImagePacker_Native *native, napi_value source, ImagePacker_Opts *opts, uint8_t *outData, size_t *size) | Packs a PixelMap object or an ImagePacker object at the JavaScript native layer to a buffer (defined by outData) based on the specified ImagePacker_Opts struct. |
int32_t OH_ImagePacker_PackToFile (ImagePacker_Native *native, napi_value source, ImagePacker_Opts *opts, int fd) | Packs a PixelMap object or an ImagePacker object at the JavaScript native layer to a file based on the specified ImagePacker_Opts struct. |
int32_t OH_ImagePacker_Release (ImagePacker_Native *native) | Releases an ImagePacker_Native object. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙_image___native_module
harmony 鸿蒙ImageEffect_FilterDelegate
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦