harmony 鸿蒙image_pixel_map_napi.h

2025-06-12 浏览 (1)

image_pixel_map_napi.h

Overview

The image_pixel_map_napi.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_napi.h>

Since: 8

Deprecated from: 10

Substitute: image_pixel_map_mdk.h

Related module: Image

Summary

Structs

NameDescription
struct OhosPixelMapInfoDescribes the information about a PixelMap.

Enums

NameDescription
{ 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 PixelMap formats.
{ OHOS_PIXEL_MAP_SCALE_MODE_FIT_TARGET_SIZE = 0,
OHOS_PIXEL_MAP_SCALE_MODE_CENTER_CROP = 1 }
Enumerates the PixelMap scale modes.

Functions

NameDescription
int32_t 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.
int32_t OH_AccessPixels (napi_env env, napi_value value, void **addrPtr)Obtains the memory address of a PixelMap object and locks the memory.
int32_t OH_UnAccessPixels (napi_env env, napi_value value)Unlocks the memory of a PixelMap object. This function is used with OH_AccessPixels in pairs.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Image Kit

harmony 鸿蒙_image___native_module

harmony 鸿蒙Image_Region

harmony 鸿蒙Image_Size

harmony 鸿蒙Image_String

harmony 鸿蒙ImageEffect

harmony 鸿蒙ImageEffect_Any

harmony 鸿蒙ImageEffect_FilterDelegate

harmony 鸿蒙ImageEffect_FilterNames

harmony 鸿蒙ImageEffect_Region

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/gutFAV