From faf63e1d13f9a9ea28776d00d18b01015bdb06e3 Mon Sep 17 00:00:00 2001 From: xiaobjy Date: Fri, 19 Apr 2024 17:43:03 +0800 Subject: [PATCH] pixelmap add tosdr capi Signed-off-by: xiaobjy Change-Id: I59a7f6bf561029936e6b410df18a2ce294301ab2 --- .../image_framework/include/image/pixelmap_native.h | 11 +++++++++++ multimedia/image_framework/libpixelmap.ndk.json | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/multimedia/image_framework/include/image/pixelmap_native.h b/multimedia/image_framework/include/image/pixelmap_native.h index 5f176d82159..d2d894503c7 100644 --- a/multimedia/image_framework/include/image/pixelmap_native.h +++ b/multimedia/image_framework/include/image/pixelmap_native.h @@ -334,6 +334,17 @@ Image_ErrorCode OH_PixelmapNative_ReadPixels(OH_PixelmapNative *pixelmap, uint8_ */ Image_ErrorCode OH_PixelmapNative_WritePixels(OH_PixelmapNative *pixelmap, uint8_t *source, size_t bufferSize); +/** + * @brief Convert {@link OH_PixelmapNative} to standard dynamic range. + * + * @param pixelmap The Pixelmap pointer will be operated. Pointer connot be null. + * @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - The operation is successful. + * returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - Parameter error.Possible causes:Parameter verification failed. + * returns {@link Image_ErrorCode} IMAGE_UNSUPPORTED_OPERATION - Unsupported operation.Pixelmap can't be converted. + * @since 12 + */ +Image_ErrorCode OH_PixelmapNative_ToSdr(OH_PixelmapNative *pixelmap); + /** * @brief Obtains pixel map information of this image. * diff --git a/multimedia/image_framework/libpixelmap.ndk.json b/multimedia/image_framework/libpixelmap.ndk.json index c1c138185be..99edf9dd107 100644 --- a/multimedia/image_framework/libpixelmap.ndk.json +++ b/multimedia/image_framework/libpixelmap.ndk.json @@ -79,6 +79,10 @@ "first_introduced": "12", "name": "OH_PixelmapNative_WritePixels" }, + { + "first_introduced": "12", + "name": "OH_PixelmapNative_ToSdr" + }, { "first_introduced": "12", "name": "OH_PixelmapNative_GetImageInfo" -- Gitee