image_native.h

Overview

The image_native.h file declares the cropping rectangle, size, and component data of an image.

Library: libohimage.so

System capability: SystemCapability.Multimedia.Image.Core

Since: 12

Related module: Image_NativeModule

Summary

Types

Name Description
typedef struct OH_ImageNative OH_ImageNative Defines the alias for an image object at the native layer.

Functions

Name Description
Image_ErrorCode OH_ImageNative_GetImageSize (OH_ImageNative *image, Image_Size *size) Obtains the Image_Size information of an OH_ImageNative object.
Image_ErrorCode OH_ImageNative_GetComponentTypes (OH_ImageNative *image, uint32_t **types, size_t *typeSize) Obtains the component types of an OH_ImageNative object.
Image_ErrorCode OH_ImageNative_GetByteBuffer (OH_ImageNative *image, uint32_t componentType, OH_NativeBuffer **nativeBuffer) Obtains the buffer corresponding to a component type in an OH_ImageNative object.
Image_ErrorCode OH_ImageNative_GetBufferSize (OH_ImageNative *image, uint32_t componentType, size_t *size) Obtains the size of the buffer corresponding to a component type in an OH_ImageNative object.
Image_ErrorCode OH_ImageNative_GetRowStride (OH_ImageNative *image, uint32_t componentType, int32_t *rowStride) Obtains the row stride corresponding to a component type in an OH_ImageNative object.
Image_ErrorCode OH_ImageNative_GetPixelStride (OH_ImageNative *image, uint32_t componentType, int32_t *pixelStride) Obtains the pixel stride corresponding to a component type in an OH_ImageNative object.
Image_ErrorCode OH_ImageNative_GetTimestamp (OH_ImageNative *image, int64_t *timestamp) Obtains the timestamp of an OH_ImageNative object.
Image_ErrorCode OH_ImageNative_Release (OH_ImageNative *image) Releases an OH_ImageNative object.