OH_ImageBufferData

typedef struct {...} OH_ImageBufferData

Overview

OH_ImageBufferData is the image data struct encapsulated at the native layer. To obtain an OH_ImageNative_GetBufferData object, call OH_ImageNative_GetBufferData.
The struct stores the shallow copy of the original image data. Once the original data is released, no read or write operations should be performed on the pointers within this struct; otherwise, undefined behavior will occur.

Since: 23

Related module: Image_NativeModule

Header file: image_native.h

Summary

Member Variables

Name Description
int32_t *rowStride Array of row strides of image color components, in pixels.
int32_t *pixelStride Array of pixel pitches of image color components, in pixels.
int32_t numStride Array length.
size_t bufferSize Buffer size, in bytes.
OH_NativeBuffer *nativeBuffer Pointer to the OH_NativeBuffer object of the image.