picture_native.h

Overview

The file declares the APIs for obtaining picture data and information.

File to include: <multimedia/image_framework/image/picture_native.h>

Library: libpicture.so

System capability: SystemCapability.Multimedia.Image.Core

Since: 13

Related module: Image_NativeModule

Summary

Structs

Name typedef Keyword Description
OH_PictureNative OH_PictureNative Describes the picture, which is used to perform operations related to the picture.
OH_AuxiliaryPictureNative OH_AuxiliaryPictureNative Describes the auxiliary picture, which is used to perform operations related to the auxiliary picture.
OH_AuxiliaryPictureInfo OH_AuxiliaryPictureInfo Describes the auxiliary picture information, which is used to perform operations related to the auxiliary picture information.
OH_ComposeOptions OH_ComposeOptions HDR composition option struct encapsulated at the native layer. It is used to specify parameters used for HDR composition, such as the target pixel format.

Enums

Name typedef Keyword Description
Image_AuxiliaryPictureType Image_AuxiliaryPictureType Type of the auxiliary picture.

Functions

Name Description
Image_ErrorCode OH_ComposeOptions_Create(OH_ComposeOptions **options) Creates an OH_ComposeOptions instance.
Image_ErrorCode OH_ComposeOptions_SetDesiredPixelFormat(OH_ComposeOptions *options, PIXEL_FORMAT desiredPixelFormat) Sets the pixel format in OH_ComposeOptions.
Image_ErrorCode OH_ComposeOptions_GetDesiredPixelFormat(OH_ComposeOptions *options, PIXEL_FORMAT *desiredPixelFormat) Obtains the pixel format in OH_ComposeOptions.
Image_ErrorCode OH_ComposeOptions_Release(OH_ComposeOptions *options) Releases the pointer to OH_ComposeOptions.
Image_ErrorCode OH_PictureNative_CreatePicture(OH_PixelmapNative *mainPixelmap, OH_PictureNative **picture) Creates the pointer to an OH_PictureNative object.
Image_ErrorCode OH_PictureNative_GetMainPixelmap(OH_PictureNative *picture, OH_PixelmapNative **mainPixelmap) Obtains the pointer to the OH_PixelmapNative object of a main picture.
Image_ErrorCode OH_PictureNative_GetHdrComposedPixelmap(OH_PictureNative *picture, OH_PixelmapNative **hdrPixelmap) Obtains the pointer to the OH_PixelmapNative object of an HDR picture.
Image_ErrorCode OH_PictureNative_GetHdrComposedPixelmapWithOptions(OH_PictureNative *picture, OH_ComposeOptions *options, OH_PixelmapNative **hdrPixelmap) Obtains the pointer to OH_PixelmapNative of an HDR picture based on OH_ComposeOptions.
Image_ErrorCode OH_PictureNative_GetGainmapPixelmap(OH_PictureNative *picture, OH_PixelmapNative **gainmapPixelmap) Obtains the pointer to the OH_PixelmapNative object of a gain map.
Image_ErrorCode OH_PictureNative_SetAuxiliaryPicture(OH_PictureNative *picture, Image_AuxiliaryPictureType type, OH_AuxiliaryPictureNative *auxiliaryPicture) Sets an auxiliary picture.
Image_ErrorCode OH_PictureNative_GetAuxiliaryPicture(OH_PictureNative *picture, Image_AuxiliaryPictureType type, OH_AuxiliaryPictureNative **auxiliaryPicture) Obtains an auxiliary picture by type.
Image_ErrorCode OH_PictureNative_GetMetadata(OH_PictureNative *picture, Image_MetadataType metadataType, OH_PictureMetadata **metadata) Obtains the metadata of a main picture.
Image_ErrorCode OH_PictureNative_SetMetadata(OH_PictureNative *picture, Image_MetadataType metadataType, OH_PictureMetadata *metadata) Sets the metadata for a main picture.
Image_ErrorCode OH_PictureNative_Release(OH_PictureNative *picture) Releases the pointer to an OH_PictureNative object.
Image_ErrorCode OH_AuxiliaryPictureNative_Create(uint8_t *data, size_t dataLength, Image_Size *size, Image_AuxiliaryPictureType type, OH_AuxiliaryPictureNative **auxiliaryPicture) Creates the pointer to an OH_AuxiliaryPictureNative object. This API supports only continuous pixel data whose pixel format is BGRA_8888 and creates an auxiliary picture in RGBA_8888 format.
Image_ErrorCode OH_AuxiliaryPictureNative_WritePixels(OH_AuxiliaryPictureNative *auxiliaryPicture, uint8_t *source, size_t bufferSize) Reads pixels in the buffer and writes the result to an auxiliary picture.
Image_ErrorCode OH_AuxiliaryPictureNative_ReadPixels(OH_AuxiliaryPictureNative *auxiliaryPicture, uint8_t *destination, size_t *bufferSize) Reads pixels of an auxiliary picture and writes the result to the buffer.
Image_ErrorCode OH_AuxiliaryPictureNative_GetType(OH_AuxiliaryPictureNative *auxiliaryPicture, Image_AuxiliaryPictureType *type) Obtains the type of an auxiliary picture.
Image_ErrorCode OH_AuxiliaryPictureNative_GetInfo(OH_AuxiliaryPictureNative *auxiliaryPicture, OH_AuxiliaryPictureInfo **info) Obtains the information of an auxiliary picture.
Image_ErrorCode OH_AuxiliaryPictureNative_SetInfo(OH_AuxiliaryPictureNative *auxiliaryPicture, OH_AuxiliaryPictureInfo *info) Sets the information for an auxiliary picture.
Image_ErrorCode OH_AuxiliaryPictureNative_GetMetadata(OH_AuxiliaryPictureNative *auxiliaryPicture, Image_MetadataType metadataType, OH_PictureMetadata **metadata) Obtains the metadata of an auxiliary picture.
Image_ErrorCode OH_AuxiliaryPictureNative_SetMetadata(OH_AuxiliaryPictureNative *auxiliaryPicture, Image_MetadataType metadataType, OH_PictureMetadata *metadata) Sets the metadata for an auxiliary picture.
Image_ErrorCode OH_AuxiliaryPictureNative_Release(OH_AuxiliaryPictureNative *picture) Releases the pointer to an OH_AuxiliaryPictureNative object.
Image_ErrorCode OH_AuxiliaryPictureInfo_Create(OH_AuxiliaryPictureInfo **info) Creates an OH_AuxiliaryPictureInfo object.
Image_ErrorCode OH_AuxiliaryPictureInfo_GetType(OH_AuxiliaryPictureInfo *info, Image_AuxiliaryPictureType *type) Obtains the auxiliary picture type in OH_AuxiliaryPictureInfo.
Image_ErrorCode OH_AuxiliaryPictureInfo_SetType(OH_AuxiliaryPictureInfo *info, Image_AuxiliaryPictureType type) Sets the auxiliary picture type in OH_AuxiliaryPictureInfo.
Image_ErrorCode OH_AuxiliaryPictureInfo_GetSize(OH_AuxiliaryPictureInfo *info, Image_Size *size) Obtains the image size in OH_AuxiliaryPictureInfo.
Image_ErrorCode OH_AuxiliaryPictureInfo_SetSize(OH_AuxiliaryPictureInfo *info, Image_Size *size) Sets the image size in OH_AuxiliaryPictureInfo.
Image_ErrorCode OH_AuxiliaryPictureInfo_GetRowStride(OH_AuxiliaryPictureInfo *info, uint32_t *rowStride) Obtains the row stride in OH_AuxiliaryPictureInfo.
Image_ErrorCode OH_AuxiliaryPictureInfo_SetRowStride(OH_AuxiliaryPictureInfo *info, uint32_t rowStride) Sets the row stride in OH_AuxiliaryPictureInfo.
Image_ErrorCode OH_AuxiliaryPictureInfo_GetPixelFormat(OH_AuxiliaryPictureInfo *info, PIXEL_FORMAT *pixelFormat) Obtains the pixel format in OH_AuxiliaryPictureInfo.
Image_ErrorCode OH_AuxiliaryPictureInfo_SetPixelFormat(OH_AuxiliaryPictureInfo *info, PIXEL_FORMAT pixelFormat) Sets the pixel format in OH_AuxiliaryPictureInfo.
Image_ErrorCode OH_AuxiliaryPictureInfo_Release(OH_AuxiliaryPictureInfo *info) Releases the pointer to an OH_AuxiliaryPictureInfo object.

Enum Description

Image_AuxiliaryPictureType

enum Image_AuxiliaryPictureType

Description

Type of the auxiliary picture.

Since: 13

Enum Item Description
AUXILIARY_PICTURE_TYPE_GAINMAP = 1 Gain map, a mechanism for transforming an SDR image into an HDR image capable of adjustable display adjustment. It is a set of combinations describing how to apply gain map metadata.
AUXILIARY_PICTURE_TYPE_DEPTH_MAP = 2 Depth map, which stores the depth data of an image. It captures the distance between each pixel and the camera to provide 3D scene structure. It is usually used for 3D modeling and scene comprehension.
AUXILIARY_PICTURE_TYPE_UNREFOCUS_MAP = 3 Defocused portrait original image, which provides a method to emphasize background blur in portrait photographing. It helps users select a focus region in post-processing, allowing for greater creative control.
AUXILIARY_PICTURE_TYPE_LINEAR_MAP = 4 Linear map, which is used to provide additional viewpoints or supplementary information. It is usually used to enhance visual effects and can contain linear representations of lighting, colors, or other visual elements in a scene.
AUXILIARY_PICTURE_TYPE_FRAGMENT_MAP = 5 Fragment map, which indicates regions obscured by watermarks in the original image. It is used to remove or correct the watermark interference, thereby enhancing the image completeness and visibility.

Function Description

OH_ComposeOptions_Create()

Image_ErrorCode OH_ComposeOptions_Create(OH_ComposeOptions **options)

Description

Creates an OH_ComposeOptions instance.

Since: 23

Parameters

Name Description
OH_ComposeOptions **options Pointer to OH_ComposeOptions.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_ComposeOptions_SetDesiredPixelFormat()

Image_ErrorCode OH_ComposeOptions_SetDesiredPixelFormat(OH_ComposeOptions *options, PIXEL_FORMAT desiredPixelFormat)

Description

Sets the pixel format in OH_ComposeOptions.

Since: 23

Parameters

Name Description
OH_ComposeOptions *options Pointer to OH_ComposeOptions.
PIXEL_FORMAT desiredPixelFormat Pixel format. The RGBA_1010102, YCBCR_P010, and YCRCB_P010 formats are supported.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: The parameter is incorrect. For example, options is nullptr or the passed desiredPixelFormat is not supported.

OH_ComposeOptions_GetDesiredPixelFormat()

Image_ErrorCode OH_ComposeOptions_GetDesiredPixelFormat(OH_ComposeOptions *options, PIXEL_FORMAT *desiredPixelFormat)

Description

Obtains the pixel format in OH_ComposeOptions.

Since: 23

Parameters

Name Description
OH_ComposeOptions *options Pointer to OH_ComposeOptions.
PIXEL_FORMAT *desiredPixelFormat Pixel format in the composition options.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_ComposeOptions_Release()

Image_ErrorCode OH_ComposeOptions_Release(OH_ComposeOptions *options)

Description

Releases the pointer to OH_ComposeOptions.

Since: 23

Parameters

Name Description
OH_ComposeOptions *options Pointer to OH_ComposeOptions.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_PictureNative_CreatePicture()

Image_ErrorCode OH_PictureNative_CreatePicture(OH_PixelmapNative *mainPixelmap, OH_PictureNative **picture)

Description

Creates the pointer to an OH_PictureNative object.

Since: 13

Parameters

Name Description
OH_PixelmapNative *mainPixelmap Pointer to the OH_PixelmapNative object of the main picture.
OH_PictureNative **picture Double pointer to the OH_PictureNative object created.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_PictureNative_GetMainPixelmap()

Image_ErrorCode OH_PictureNative_GetMainPixelmap(OH_PictureNative *picture, OH_PixelmapNative **mainPixelmap)

Description

Obtains the pointer to the OH_PixelmapNative object of a main picture.

Since: 13

Parameters

Name Description
OH_PictureNative *picture Pointer to an OH_PictureNative object.
OH_PixelmapNative **mainPixelmap Double pointer to the OH_PixelmapNative object obtained.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_PictureNative_GetHdrComposedPixelmap()

Image_ErrorCode OH_PictureNative_GetHdrComposedPixelmap(OH_PictureNative *picture, OH_PixelmapNative **hdrPixelmap)

Description

Obtains the pointer to the OH_PixelmapNative object of an HDR picture.

Since: 13

Parameters

Name Description
OH_PictureNative *picture Pointer to an OH_PictureNative object.
OH_PixelmapNative **hdrPixelmap Double pointer to the OH_PixelmapNative object of the HDR picture.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.
IMAGE_UNSUPPORTED_OPERATION: The operation is not supported. For example, the Picture object does not contain a gain map.

OH_PictureNative_GetHdrComposedPixelmapWithOptions()

Image_ErrorCode OH_PictureNative_GetHdrComposedPixelmapWithOptions(OH_PictureNative *picture, OH_ComposeOptions *options, OH_PixelmapNative **hdrPixelmap)

Description

Obtains the pointer to OH_PixelmapNative of an HDR picture based on OH_ComposeOptions.

Since: 23

Parameters

Name Description
OH_PictureNative *picture Pointer to an OH_PictureNative object.
OH_ComposeOptions *options Pointer to OH_ComposeOptions.
OH_PixelmapNative **hdrPixelmap Pointer to OH_PixelmapNative of the obtained HDR picture.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.
IMAGE_UNSUPPORTED_OPERATION: The operation is not supported. For example, the Picture object does not contain a gain map.

OH_PictureNative_GetGainmapPixelmap()

Image_ErrorCode OH_PictureNative_GetGainmapPixelmap(OH_PictureNative *picture, OH_PixelmapNative **gainmapPixelmap)

Description

Obtains the pointer to the OH_PixelmapNative object of a gain map.

Since: 13

Parameters

Name Description
OH_PictureNative *picture Pointer to an OH_PictureNative object.
OH_PixelmapNative **gainmapPixelmap Double pointer to the OH_PixelmapNative object of the gain map.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_PictureNative_SetAuxiliaryPicture()

Image_ErrorCode OH_PictureNative_SetAuxiliaryPicture(OH_PictureNative *picture, Image_AuxiliaryPictureType type, OH_AuxiliaryPictureNative *auxiliaryPicture)

Description

Sets an auxiliary picture.

Since: 13

Parameters

Name Description
OH_PictureNative *picture Pointer to an OH_PictureNative object.
Image_AuxiliaryPictureType type Type of the auxiliary picture.
OH_AuxiliaryPictureNative *auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_PictureNative_GetAuxiliaryPicture()

Image_ErrorCode OH_PictureNative_GetAuxiliaryPicture(OH_PictureNative *picture, Image_AuxiliaryPictureType type, OH_AuxiliaryPictureNative **auxiliaryPicture)

Description

Obtains an auxiliary picture by type.

Since: 13

Parameters

Name Description
OH_PictureNative *picture Pointer to an OH_PictureNative object.
Image_AuxiliaryPictureType type Type of the auxiliary picture.
OH_AuxiliaryPictureNative **auxiliaryPicture Double pointer to the OH_AuxiliaryPictureNative object obtained.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_PictureNative_GetMetadata()

Image_ErrorCode OH_PictureNative_GetMetadata(OH_PictureNative *picture, Image_MetadataType metadataType, OH_PictureMetadata **metadata)

Description

Obtains the metadata of a main picture.

Since: 13

Parameters

Name Description
OH_PictureNative *picture Pointer to an OH_PictureNative object.
Image_MetadataType metadataType Metadata type.
OH_PictureMetadata **metadata Double pointer to the metadata.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.
IMAGE_UNSUPPORTED_METADATA: unsupported metadata type.

OH_PictureNative_SetMetadata()

Image_ErrorCode OH_PictureNative_SetMetadata(OH_PictureNative *picture, Image_MetadataType metadataType, OH_PictureMetadata *metadata)

Description

Sets the metadata for a main picture.

Since: 13

Parameters

Name Description
OH_PictureNative *picture Pointer to an OH_PictureNative object.
Image_MetadataType metadataType Metadata type.
OH_PictureMetadata *metadata Pointer to the metadata.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.
IMAGE_UNSUPPORTED_METADATA: unsupported metadata type.

OH_PictureNative_Release()

Image_ErrorCode OH_PictureNative_Release(OH_PictureNative *picture)

Description

Releases the pointer to an OH_PictureNative object.

Since: 13

Parameters

Name Description
OH_PictureNative *picture Pointer to an OH_PictureNative object.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureNative_Create()

Image_ErrorCode OH_AuxiliaryPictureNative_Create(uint8_t *data, size_t dataLength, Image_Size *size, Image_AuxiliaryPictureType type, OH_AuxiliaryPictureNative **auxiliaryPicture)

Description

Creates the pointer to an OH_AuxiliaryPictureNative object. This API supports only continuous pixel data whose pixel format is BGRA_8888 and creates an auxiliary picture in RGBA_8888 format.

Since: 13

Parameters

Name Description
uint8_t *data Pointer to the image data.
size_t dataLength Length of the image data.
Image_Size *size Pointer to the size of the auxiliary picture.
Image_AuxiliaryPictureType type Type of the auxiliary picture.
OH_AuxiliaryPictureNative **auxiliaryPicture Double pointer to the OH_AuxiliaryPictureNative object created.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureNative_WritePixels()

Image_ErrorCode OH_AuxiliaryPictureNative_WritePixels(OH_AuxiliaryPictureNative *auxiliaryPicture, uint8_t *source, size_t bufferSize)

Description

Reads pixels in the buffer and writes the result to an auxiliary picture.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureNative *auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.
uint8_t *source Pixels to be written.
size_t bufferSize Buffer size.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.
IMAGE_ALLOC_FAILED: memory allocation failure.
IMAGE_COPY_FAILED: memory copy failure.

OH_AuxiliaryPictureNative_ReadPixels()

Image_ErrorCode OH_AuxiliaryPictureNative_ReadPixels(OH_AuxiliaryPictureNative *auxiliaryPicture, uint8_t *destination, size_t *bufferSize)

Description

Reads pixels of an auxiliary picture and writes the result to the buffer.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureNative *auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.
uint8_t *destination Pointer to the buffer to which the pixels of the auxiliary data will be written.
size_t *bufferSize Pointer to the buffer size.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.
IMAGE_ALLOC_FAILED: memory allocation failure.
IMAGE_COPY_FAILED: memory copy failure.

OH_AuxiliaryPictureNative_GetType()

Image_ErrorCode OH_AuxiliaryPictureNative_GetType(OH_AuxiliaryPictureNative *auxiliaryPicture, Image_AuxiliaryPictureType *type)

Description

Obtains the type of an auxiliary picture.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureNative *auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.
Image_AuxiliaryPictureType *type Pointer to the auxiliary picture type.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureNative_GetInfo()

Image_ErrorCode OH_AuxiliaryPictureNative_GetInfo(OH_AuxiliaryPictureNative *auxiliaryPicture, OH_AuxiliaryPictureInfo **info)

Description

Obtains the information of an auxiliary picture.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureNative *auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.
OH_AuxiliaryPictureInfo **info Double pointer to the auxiliary picture information.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureNative_SetInfo()

Image_ErrorCode OH_AuxiliaryPictureNative_SetInfo(OH_AuxiliaryPictureNative *auxiliaryPicture, OH_AuxiliaryPictureInfo *info)

Description

Sets the information for an auxiliary picture.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureNative *auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.
OH_AuxiliaryPictureInfo *info Pointer to the auxiliary picture information.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureNative_GetMetadata()

Image_ErrorCode OH_AuxiliaryPictureNative_GetMetadata(OH_AuxiliaryPictureNative *auxiliaryPicture, Image_MetadataType metadataType, OH_PictureMetadata **metadata)

Description

Obtains the metadata of an auxiliary picture.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureNative *auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.
Image_MetadataType metadataType Metadata type.
OH_PictureMetadata **metadata Double pointer to the metadata.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.
IMAGE_UNSUPPORTED_METADATA: unsupported metadata type, or mismatch between the metadata type and the auxiliary picture type.

OH_AuxiliaryPictureNative_SetMetadata()

Image_ErrorCode OH_AuxiliaryPictureNative_SetMetadata(OH_AuxiliaryPictureNative *auxiliaryPicture, Image_MetadataType metadataType, OH_PictureMetadata *metadata)

Description

Sets the metadata for an auxiliary picture.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureNative *auxiliaryPicture Pointer to an OH_AuxiliaryPictureNative object.
Image_MetadataType metadataType Metadata type.
OH_PictureMetadata *metadata Pointer to the metadata.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.
IMAGE_UNSUPPORTED_METADATA: unsupported metadata type, or mismatch between the metadata type and the auxiliary picture type.

OH_AuxiliaryPictureNative_Release()

Image_ErrorCode OH_AuxiliaryPictureNative_Release(OH_AuxiliaryPictureNative *picture)

Description

Releases the pointer to an OH_AuxiliaryPictureNative object.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureNative *picture Pointer to an OH_AuxiliaryPictureNative object.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureInfo_Create()

Image_ErrorCode OH_AuxiliaryPictureInfo_Create(OH_AuxiliaryPictureInfo **info)

Description

Creates an OH_AuxiliaryPictureInfo object.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureInfo **info Double pointer to the OH_AuxiliaryPictureInfo object created.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureInfo_GetType()

Image_ErrorCode OH_AuxiliaryPictureInfo_GetType(OH_AuxiliaryPictureInfo *info, Image_AuxiliaryPictureType *type)

Description

Obtains the auxiliary picture type in OH_AuxiliaryPictureInfo.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureInfo *info Pointer to the OH_AuxiliaryPictureInfo object.
Image_AuxiliaryPictureType *type Pointer to the type of the auxiliary picture.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureInfo_SetType()

Image_ErrorCode OH_AuxiliaryPictureInfo_SetType(OH_AuxiliaryPictureInfo *info, Image_AuxiliaryPictureType type)

Description

Sets the auxiliary picture type in OH_AuxiliaryPictureInfo.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureInfo *info Pointer to the OH_AuxiliaryPictureInfo object.
Image_AuxiliaryPictureType type Type of the auxiliary picture.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureInfo_GetSize()

Image_ErrorCode OH_AuxiliaryPictureInfo_GetSize(OH_AuxiliaryPictureInfo *info, Image_Size *size)

Description

Obtains the image size in OH_AuxiliaryPictureInfo.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureInfo *info Pointer to the OH_AuxiliaryPictureInfo object.
Image_Size *size Pointer to the size.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureInfo_SetSize()

Image_ErrorCode OH_AuxiliaryPictureInfo_SetSize(OH_AuxiliaryPictureInfo *info, Image_Size *size)

Description

Sets the image size in OH_AuxiliaryPictureInfo.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureInfo *info Pointer to the OH_AuxiliaryPictureInfo object.
Image_Size *size Pointer to the size.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureInfo_GetRowStride()

Image_ErrorCode OH_AuxiliaryPictureInfo_GetRowStride(OH_AuxiliaryPictureInfo *info, uint32_t *rowStride)

Description

Obtains the row stride in OH_AuxiliaryPictureInfo.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureInfo *info Pointer to the OH_AuxiliaryPictureInfo object.
uint32_t *rowStride Pointer to the row stride, which is the space occupied by each row of pixels in memory.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureInfo_SetRowStride()

Image_ErrorCode OH_AuxiliaryPictureInfo_SetRowStride(OH_AuxiliaryPictureInfo *info, uint32_t rowStride)

Description

Sets the row stride in OH_AuxiliaryPictureInfo.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureInfo *info Pointer to the OH_AuxiliaryPictureInfo object.
uint32_t rowStride Row stride, which is the space occupied by each row of pixels in memory.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureInfo_GetPixelFormat()

Image_ErrorCode OH_AuxiliaryPictureInfo_GetPixelFormat(OH_AuxiliaryPictureInfo *info, PIXEL_FORMAT *pixelFormat)

Description

Obtains the pixel format in OH_AuxiliaryPictureInfo.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureInfo *info Pointer to the OH_AuxiliaryPictureInfo object.
PIXEL_FORMAT *pixelFormat Pointer to the pixel format obtained.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureInfo_SetPixelFormat()

Image_ErrorCode OH_AuxiliaryPictureInfo_SetPixelFormat(OH_AuxiliaryPictureInfo *info, PIXEL_FORMAT pixelFormat)

Description

Sets the pixel format in OH_AuxiliaryPictureInfo.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureInfo *info Pointer to the OH_AuxiliaryPictureInfo object.
PIXEL_FORMAT pixelFormat Pixel format.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.

OH_AuxiliaryPictureInfo_Release()

Image_ErrorCode OH_AuxiliaryPictureInfo_Release(OH_AuxiliaryPictureInfo *info)

Description

Releases the pointer to an OH_AuxiliaryPictureInfo object.

Since: 13

Parameters

Name Description
OH_AuxiliaryPictureInfo *info Pointer to the OH_AuxiliaryPictureInfo object.

Returns

Type Description
Image_ErrorCode IMAGE_SUCCESS: The operation is successful.
IMAGE_BAD_PARAMETER: A parameter is incorrect.