• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# image_pixel_map_napi.h
2
3
4## Overview
5
6The **image_pixel_map_napi.h** file declares the APIs that can lock, access, and unlock a pixel map.
7
8**Since**
9
108
11
12**Related Modules**
13
14[Image](image.md)
15
16
17## Summary
18
19
20### Structs
21
22| Name| Description|
23| -------- | -------- |
24| [OHOS::Media::OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md) | Defines the pixel map information.|
25
26
27### Enums
28
29| Name| Description|
30| -------- | -------- |
31| { [OHOS::Media::OHOS_IMAGE_RESULT_SUCCESS](image.md) = 0,<br>[OHOS::Media::OHOS_IMAGE_RESULT_BAD_PARAMETER](image.md) = -1 } | Enumerates the error codes returned by the functions.|
32| { [OHOS::Media::OHOS_PIXEL_MAP_FORMAT_NONE](image.md) = 0,<br>[OHOS::Media::OHOS_PIXEL_MAP_FORMAT_RGBA_8888](image.md) = 3,<br>[OHOS::Media::OHOS_PIXEL_MAP_FORMAT_RGB_565](image.md) = 2 } | Enumerates the pixel map formats.|
33| { [OHOS::Media::OHOS_PIXEL_MAP_SCALE_MODE_FIT_TARGET_SIZE](image.md) = 0,<br>[OHOS::Media::OHOS_PIXEL_MAP_SCALE_MODE_CENTER_CROP](image.md) = 1 } | Enumerates the pixel map scale modes.|
34
35
36### Functions
37
38| Name| Description|
39| -------- | -------- |
40| [OHOS::Media::OH_GetImageInfo](image.md#oh_getimageinfo) (napi_env env, napi_value value, [OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md) \*info) | Obtains the information about a **PixelMap** object and stores the information to the [OhosPixelMapInfo](_o_h_o_s_1_1_media_1_1_ohos_pixel_map_info.md) struct.|
41| [OHOS::Media::OH_AccessPixels](image.md#oh_accesspixels) (napi_env env, napi_value value, void \*\*addrPtr) | Obtains the memory address of a **PixelMap** object and locks the memory.|
42| [OHOS::Media::OH_UnAccessPixels](image.md#oh_unaccesspixels) (napi_env env, napi_value value) | Unlocks the memory of a **PixelMap** object. This function is used with **OH_AccessPixels** in pairs.|
43