From ee0deb2f413a08679f66b46796c05d1a4f4d3e10 Mon Sep 17 00:00:00 2001 From: zhubingwei Date: Fri, 10 May 2024 16:16:51 +0800 Subject: [PATCH] add ConvertPixelFormat interface Signed-off-by: zhubingwei Change-Id: Idd81c139abd7126ffde9c11f3183279d080fa2ed --- .../image_framework/include/image/pixelmap_native.h | 13 +++++++++++++ multimedia/image_framework/libpixelmap.ndk.json | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 87a9352cd..231f35ade 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -476,6 +476,19 @@ Image_ErrorCode OH_PixelmapNative_ConvertAlphaFormat(OH_PixelmapNative* srcpixel Image_ErrorCode OH_PixelmapNative_CreateEmptyPixelmap( OH_Pixelmap_InitializationOptions *options, OH_PixelmapNative **pixelmap); +/** + * @brief The interversion of the two formats + * + * @param srcPixelMap Source Image PixelMap. + * @param destPixelMap Destination Image PixelMap. + * @param destPixelFormat Destination Image PixelFormat. + * @return Returns {@link Image_ErrorCode} IMAGE_RESULT_SUCCESS - if the operation is successful. + * @since 12 + * @Syscap SystemCapability.Multimedia.Image + */ +Image_ErrorCode OH_PixelMapNative_ConvertPixelFormat(OH_PixelmapNative *srcPixelMap, OH_PixelmapNative **destPixelMap, + int32_t destPixelFormat); + #ifdef __cplusplus }; #endif diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index 05f677374..7b53bab00 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -130,5 +130,9 @@ { "first_introduced": "12", "name": "OH_PixelmapNative_CreateEmptyPixelmap" + }, + { + "first_introduced": "12", + "name": "OH_PixelMapNative_ConvertPixelFormat" } ] \ No newline at end of file -- Gitee