diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index fccadfd990a27688157db057e8cbf40443fdf4e4..fabf3ab5163a0d9ae535f546b62428471cd10987 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 Convert the image format based on the input target pixel format. + * + * @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 c2b1ca51855a39578a673daca166aa73395ac735..7dd3cb2a750490c74e6c9c891cc46c2604684476 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