From d8d9e0867a2c822e9868c228958815ed0726ced1 Mon Sep 17 00:00:00 2001 From: zhuzhihui7 Date: Fri, 10 May 2024 16:16:51 +0800 Subject: [PATCH 1/2] add ConvertPixelFormat interface Change-Id: Idd81c139abd7126ffde9c11f3183279d080fa2ed Signed-off-by: zhuzhihui7 --- .../image_framework/include/image/pixelmap_native.h | 12 ++++++++++++ multimedia/image_framework/libpixelmap.ndk.json | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index fccadfd99..e4fa08210 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -487,6 +487,18 @@ 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 + */ +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 c2b1ca518..7dd3cb2a7 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -134,5 +134,9 @@ { "first_introduced": "12", "name": "OH_PixelmapNative_CreateEmptyPixelmap" + }, + { + "first_introduced": "12", + "name": "OH_PixelMapNative_ConvertPixelFormat" } ] \ No newline at end of file -- Gitee From 0a9a0e0e634e163146daeb5d49a2f3316ecdcab9 Mon Sep 17 00:00:00 2001 From: zhuzhihui7 Date: Wed, 29 May 2024 16:22:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9OH=5FPixelMapNative=5FCon?= =?UTF-8?q?vertPixelFormat=E6=8E=A5=E5=8F=A3=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhuzhihui7 Change-Id: I25cdbccf58861b71ae6b37aee1d93f2aa51b6f68 --- multimedia/image_framework/include/image/pixelmap_native.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index e4fa08210..fabf3ab51 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -488,7 +488,7 @@ Image_ErrorCode OH_PixelmapNative_CreateEmptyPixelmap( OH_Pixelmap_InitializationOptions *options, OH_PixelmapNative **pixelmap); /** - * @brief The interversion of the two formats + * @brief Convert the image format based on the input target pixel format. * * @param srcPixelMap Source Image PixelMap. * @param destPixelMap Destination Image PixelMap. -- Gitee