From f81dbeb07ddb2e85a4d52a119525034edb6c4a86 Mon Sep 17 00:00:00 2001 From: yaozhupeng Date: Fri, 16 Aug 2024 22:56:19 +0800 Subject: [PATCH] add interface Signed-off-by: yaozhupeng --- .../include/image/pixelmap_native.h | 16 ++++++++++++++++ multimedia/image_framework/libpixelmap.ndk.json | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 875bafe5b..45425aedc 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -765,6 +765,22 @@ Image_ErrorCode OH_PixelmapNative_ConvertAlphaFormat(OH_PixelmapNative* srcpixel Image_ErrorCode OH_PixelmapNative_CreateEmptyPixelmap( OH_Pixelmap_InitializationOptions *options, OH_PixelmapNative **pixelmap); +/** + * @brief Set metadata. + * + * @param pixelmap The Pixelmap pointer to be operated. + * @param key Type of metadata. + * @param value Value of metadata. + * @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful. + * returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter, key and value are incorrect. + * returns {@link Image_ErrorCode} IMAGE_DMA_NOT_EXIST - if DMA memory does not exist. + * returns {@link Image_ErrorCode} IMAGE_COPY_FAILED - if memory copy failed. + * @see OH_PixelmapNative + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_SetMetadata(OH_PixelmapNative *pixelmap, OH_Pixelmap_HdrMetadataKey key, + OH_Pixelmap_HdrMetadataValue *value); + #ifdef __cplusplus }; #endif diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 5a1af8e20..9769d9dcc 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -154,5 +154,9 @@ { "first_introduced": "12", "name": "OH_PixelmapNative_ConvertPixelmapNativeFromNapi" + }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_SetMetadata" } ] \ No newline at end of file -- Gitee