openharmony 鸿蒙 capi-image-nativemodule-oh-pixelmapnative

2026-08-25 浏览 (1)

OH_PixelmapNative

struct OH_PixelmapNative

Overview

The OH_PixelmapNative struct describes an uncompressed PixelMap format, which is encapsulated at the native layer after images are decoded.

To create an OH_PixelmapNative object, call OH_PixelmapNative_CreatePixelmap. By default, BGRA_8888 is used for data processing.

To release an OH_PixelmapNative object, call OH_PixelmapNative_Release.

The table below describes the content and operation mode of the OH_PixelmapNative struct.

Field TypeField NameField DescriptionOperation FunctionFunction Description
uint8_tdataImage pixel data.OH_PixelmapNative_ReadPixelsReads the pixels of a PixelMap and writes the result to an ArrayBuffer.
uint8_tdataImage pixel data.OH_PixelmapNative_WritePixelsReads the pixel data in the buffer and writes the result to a PixelMap.
OH_Pixelmap_ImageInfoimageInfoImage information.OH_PixelmapNative_GetImageInfoObtains the image information of a PixelMap.
floatalphaRateOpacity.OH_PixelmapNative_OpacitySets the opacity rate to enable the PixelMap to achieve the corresponding opacity effect.
float, floatscaleX, scaleYScale ratios along the X axis and Y axis, respectively.OH_PixelmapNative_ScaleScales a PixelMap based on a given width and height.
float, floatx, yDistances to translate along the X axis and Y axis, respectively.OH_PixelmapNative_TranslateTranslates a PixelMap based on given coordinates.
floatangleRotation angle.OH_PixelmapNative_RotateRotates a PixelMap based on a given angle.
bool, boolshouldFlipHorizontally, shouldFlipVerticallyWhether the PixelMap is flipped horizontally or vertically.OH_PixelmapNative_FlipFlips a PixelMap based on a given angle.
Image_RegionregionCropping region.OH_PixelmapNative_CropCrops a PixelMap based on a given size.

Since: 12

Related module: Image_NativeModule

Header file: pixelmap_native.h

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-image-nativemodule-oh-pixelmap-hdrmetadatavalue

openharmony 鸿蒙 capi-image-imagepacker-opts-

openharmony 鸿蒙 capi-image-nativemodule-image-region

openharmony 鸿蒙 capi-image-imagepacker-native-

openharmony 鸿蒙 capi-image-imagenative-

openharmony 鸿蒙 capi-image-processing-h

openharmony 鸿蒙 capi-image-ohosimagesourcesupportedformat

openharmony 鸿蒙 capi-image-nativemodule-image-size

openharmony 鸿蒙 capi-image-mdk-h

openharmony 鸿蒙 capi-image-ohosimagesourcedelaytimelist

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