harmony 鸿蒙image_pixel_map_mdk.h
image_pixel_map_mdk.h
Overview
The image_pixel_map_mdk.h file declares the APIs used to lock, access, and unlock a PixelMap.
Library: libpixelmap_ndk.z.so
File to include: <multimedia/image_framework/image_pixel_map_mdk.h>
Since: 10
Related module: Image
Summary
Structs
Name | Description |
---|---|
struct OhosPixelMapInfos | Describes the information about a PixelMap. |
struct OhosPixelMapCreateOps | Describes the options used for creating a PixelMap. |
Types
Name | Description |
---|---|
typedef struct NativePixelMap_ NativePixelMap | Defines a struct for the data type name of the PixelMap at the native layer. |
typedef struct OhosPixelMapInfos OhosPixelMapInfos | Defines a struct for the information about a PixelMap. |
Enums
Name | Description |
---|---|
{ OHOS_PIXEL_MAP_ALPHA_TYPE_UNKNOWN = 0, OHOS_PIXEL_MAP_ALPHA_TYPE_OPAQUE = 1, OHOS_PIXEL_MAP_ALPHA_TYPE_PREMUL = 2, OHOS_PIXEL_MAP_ALPHA_TYPE_UNPREMUL = 3 } |
Enumerates the PixelMap alpha types. |
{ OHOS_PIXEL_MAP_READ_ONLY = 0, OHOS_PIXEL_MAP_EDITABLE = 1 } |
Enumerates the PixelMap editing types. |
OH_PixelMap_AntiAliasingLevel { OH_PixelMap_AntiAliasing_NONE = 0, OH_PixelMap_AntiAliasing_LOW = 1, OH_PixelMap_AntiAliasing_MEDIUM = 2, OH_PixelMap_AntiAliasing_HIGH = 3 } |
Enumerates the antialiasing levels used for scaling a PixelMap. |
Functions
Name | Description |
---|---|
int32_t OH_PixelMap_CreatePixelMap (napi_env env, OhosPixelMapCreateOps info, void *buf, size_t len, napi_value *res) | Creates a PixelMap object. |
int32_t OH_PixelMap_CreatePixelMapWithStride (napi_env env, OhosPixelMapCreateOps info, void *buf, size_t len, int32_t rowStride, napi_value *res) | Creates a PixelMap object. Currently, only BGRA input streams are supported. For a PixelMap in RGBA format (with the size greater than 512*512), DMA memory is used by default. |
int32_t OH_PixelMap_CreateAlphaPixelMap (napi_env env, napi_value source, napi_value *alpha) | Creates a PixelMap object that contains only alpha channel information. |
NativePixelMap * OH_PixelMap_InitNativePixelMap (napi_env env, napi_value source) | Initializes a NativePixelMap object. |
int32_t OH_PixelMap_GetBytesNumberPerRow (const NativePixelMap *native, int32_t *num) | Obtains the number of bytes per row of a NativePixelMap object. |
int32_t OH_PixelMap_GetIsEditable (const NativePixelMap *native, int32_t *editable) | Checks whether a NativePixelMap object is editable. |
int32_t OH_PixelMap_IsSupportAlpha (const NativePixelMap *native, int32_t *alpha) | Checks whether a NativePixelMap object supports alpha channels. |
int32_t OH_PixelMap_SetAlphaAble (const NativePixelMap *native, int32_t alpha) | Sets an alpha channel for a NativePixelMap object. |
int32_t OH_PixelMap_GetDensity (const NativePixelMap *native, int32_t *density) | Obtains the pixel density of a NativePixelMap object. |
int32_t OH_PixelMap_SetDensity (const NativePixelMap *native, int32_t density) | Sets the pixel density for a NativePixelMap object. |
int32_t OH_PixelMap_SetOpacity (const NativePixelMap *native, float opacity) | Sets the opacity for a NativePixelMap object. |
int32_t OH_PixelMap_Scale (const NativePixelMap *native, float x, float y) | Scales a NativePixelMap object. |
int32_t OH_PixelMap_ScaleWithAntiAliasing (const NativePixelMap *native, float x, float y, OH_PixelMap_AntiAliasingLevel level) | Scales a NativePixelMap object based on the specified antialiasing level, width, and height. |
int32_t OH_PixelMap_Translate (const NativePixelMap *native, float x, float y) | Translates a NativePixelMap object. |
int32_t OH_PixelMap_Rotate (const NativePixelMap *native, float angle) | Rotates a NativePixelMap object. |
int32_t OH_PixelMap_Flip (const NativePixelMap *native, int32_t x, int32_t y) | Flips a NativePixelMap object. |
int32_t OH_PixelMap_Crop (const NativePixelMap *native, int32_t x, int32_t y, int32_t width, int32_t height) | Crops a NativePixelMap object. |
int32_t OH_PixelMap_GetImageInfo (const NativePixelMap *native, OhosPixelMapInfos *info) | Obtains the image information of a NativePixelMap object. |
int32_t OH_PixelMap_AccessPixels (const NativePixelMap *native, void **addr) | Obtains the memory address of a NativePixelMap object and locks the memory. |
int32_t OH_PixelMap_UnAccessPixels (const NativePixelMap *native) | Unlocks the memory of a NativePixelMap object. This function is used with OH_PixelMap_AccessPixels in pairs. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙_image___native_module
harmony 鸿蒙ImageEffect_FilterDelegate
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦