OH_Pixelmap_ImageInfo

struct OH_Pixelmap_ImageInfo

Overview

The OH_Pixelmap_ImageInfo struct describes the image information encapsulated at the native layer. The struct stores the width, height, row stride, pixel format, and HDR of an image.

To create an OH_Pixelmap_ImageInfo object, call OH_PixelmapImageInfo_Create.

To release an OH_Pixelmap_ImageInfo object, call OH_PixelmapImageInfo_Release.

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

Field Type Field Name Field Description Operation Function Function Description
uint32_t width Image width. OH_PixelmapImageInfo_GetWidth Obtains the image width.
uint32_t height Image height. OH_PixelmapImageInfo_GetHeight Obtains the image height.
uint32_t rowStride Row stride. OH_PixelmapImageInfo_GetRowStride Obtains the row stride.
int32_t pixelFormat Pixel format. OH_PixelmapImageInfo_GetPixelFormat Obtains the pixel format.
int32_t alphaType Alpha type. OH_PixelmapImageInfo_GetAlphaType Obtains the alpha type.
bool isHdr Whether the image is an HDR image. OH_PixelmapImageInfo_GetDynamicRange Obtains the dynamic range of a PixelMap.

Since: 12

Related module: Image_NativeModule

Header file: pixelmap_native.h