image_pixel_map_napi.h
Overview
The image_pixel_map_napi.h file declares the APIs used to lock, access, and unlock a pixel map.
Since: 8
Deprecated from: 8
Substitute: image_pixel_map_mdk.h
Related module: Image
Summary
Structs
Name | Description |
---|---|
OHOS::Media::OhosPixelMapInfo | Defines the information about a pixel map. |
Enums
Name | Description |
---|---|
{ OHOS_IMAGE_RESULT_SUCCESS = 0, OHOS_IMAGE_RESULT_BAD_PARAMETER = -1 } |
Enumerates the error codes returned by the functions. |
{ OHOS_PIXEL_MAP_FORMAT_NONE = 0, OHOS_PIXEL_MAP_FORMAT_RGBA_8888 = 3, OHOS_PIXEL_MAP_FORMAT_RGB_565 = 2 } |
Enumerates the pixel map formats. |
{ OHOS_PIXEL_MAP_SCALE_MODE_FIT_TARGET_SIZE = 0, OHOS_PIXEL_MAP_SCALE_MODE_CENTER_CROP = 1 } |
Enumerates the pixel map scale modes. |
Functions
Name | Description |
---|---|
OHOS::Media::OH_GetImageInfo (napi_env env, napi_value value, OhosPixelMapInfo *info) | Obtains the information about a PixelMap object and stores the information to the OhosPixelMapInfo struct. |
OHOS::Media::OH_AccessPixels (napi_env env, napi_value value, void **addrPtr) | Obtains the memory address of a PixelMap object and locks the memory. |
OHOS::Media::OH_UnAccessPixels (napi_env env, napi_value value) | Unlocks the memory of a PixelMap object. This function is used with OH_AccessPixels in pairs. |