diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 43000f092642d374b6691ebc83e47a952ef5f53f..af3baf33237e2d2fd306e4d761983193ca9233c5 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -386,6 +386,30 @@ Image_ErrorCode OH_DecodingOptions_SetCropRegion(OH_DecodingOptions *options, Im */ Image_ErrorCode OH_DecodingOptions_GetCropRegion(OH_DecodingOptions *options, Image_Region *cropRegion); +/** + * @brief Gets desired color space for decoding options. + * + * @param options Pointer to the decoding options. + * @param colorSpace desired color space, {@link ColorSpaceName}. + * @return Returns one of the following result codes: + * {@link IMAGE_SUCCESS}: The execution is successful. + * {@link IMAGE_SOURCE_INVALID_PARAMETER}: options or colorSpace is a null pointer. + * @since 20 + */ +Image_ErrorCode OH_DecodingOptions_GetDesiredColorSpace(OH_DecodingOptions *options, int32_t *colorSpace); + +/** + * @brief Sets desired color space for decoding options. + * + * @param options Pointer to the decoding options. + * @param colorSpace desired color space, {@link ColorSpaceName}. + * @return Returns one of the following result codes: + * {@link IMAGE_SUCCESS}: The execution is successful. + * {@link IMAGE_SOURCE_INVALID_PARAMETER}: options is a null pointer or colorSpace is not supported. + * @since 20 + */ +Image_ErrorCode OH_DecodingOptions_SetDesiredColorSpace(OH_DecodingOptions *options, int32_t colorSpace); + /** * @brief delete OH_DecodingOptions pointer. * diff --git a/multimedia/image_framework/libimage_source.ndk.json b/multimedia/image_framework/libimage_source.ndk.json index 104bb376a28f2b6593fb091819268a0dbaf79520..8dcff7105b5aae90b96febb5d902f4211e2c2582 100644 --- a/multimedia/image_framework/libimage_source.ndk.json +++ b/multimedia/image_framework/libimage_source.ndk.json @@ -87,6 +87,14 @@ "first_introduced": "19", "name": "OH_DecodingOptions_GetCropRegion" }, + { + "first_introduced": "20", + "name": "OH_DecodingOptions_GetDesiredColorSpace" + }, + { + "first_introduced": "20", + "name": "OH_DecodingOptions_SetDesiredColorSpace" + }, { "first_introduced": "12", "name": "OH_DecodingOptions_Release"