diff --git a/multimedia/image_framework/include/image/image_packer_native.h b/multimedia/image_framework/include/image/image_packer_native.h
index 6020ea9ccea86798472d023cbe3b052520e48487..7149c5fd80dfbabdb8ed17de305889f58e3cc6ba 100644
--- a/multimedia/image_framework/include/image/image_packer_native.h
+++ b/multimedia/image_framework/include/image/image_packer_native.h
@@ -479,6 +479,18 @@ Image_ErrorCode OH_ImagePackerNative_PackToFileFromPixelmapSequence(OH_ImagePack
*/
Image_ErrorCode OH_ImagePackerNative_Release(OH_ImagePackerNative *imagePacker);
+/**
+ * @brief Obtains the supported image formats that can be encoded.
+ *
+ * @param supportedFormats Double pointer to an array of the supported image formats.
+ * @param length Pointer to the length of the array.
+ * @return One of the following result codes:
+ * {@link IMAGE_SUCCESS} if the execution is successful.
+ * {@link IMAGE_PACKER_INVALID_PARAMETER} if supportedFormats or length is empty.
+ * @since 20
+ */
+Image_ErrorCode OH_ImagePackerNative_GetSupportedFormats(Image_MimeType **supportedFormats, size_t *length);
+
#ifdef __cplusplus
};
#endif
diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h
index 66e83042b94f9b6dfb577cce2c9455bca9e5ab19..3513d60959df52b6e53895076f465ee4b1359334 100644
--- a/multimedia/image_framework/include/image/image_source_native.h
+++ b/multimedia/image_framework/include/image/image_source_native.h
@@ -176,6 +176,18 @@ Image_ErrorCode OH_ImageSourceInfo_GetHeight(OH_ImageSource_Info *info, uint32_t
*/
Image_ErrorCode OH_ImageSourceInfo_GetDynamicRange(OH_ImageSource_Info *info, bool *isHdr);
+/**
+ * @brief Obtains the MIME type of an image source.
+ *
+ * @param info Pointer to the OH_ImageSource_Info struct.
+ * @param mimeType Pointer to the MIME type of the image source.
+ * @return Returns one of the following result codes:
+ * {@link IMAGE_SUCCESS}: The execution is successful.
+ * {@link IMAGE_SOURCE_INVALID_PARAMETER}: info or mimeType is a null pointer.
+ * @since 20
+ */
+Image_ErrorCode OH_ImageSourceInfo_GetMimeType(OH_ImageSource_Info *info, Image_MimeType *mimeType);
+
/**
* @brief delete OH_ImageSource_Info pointer.
*
@@ -386,6 +398,30 @@ Image_ErrorCode OH_DecodingOptions_SetCropRegion(OH_DecodingOptions *options, Im
*/
Image_ErrorCode OH_DecodingOptions_GetCropRegion(OH_DecodingOptions *options, Image_Region *cropRegion);
+/**
+ * @brief Obtains the color space set in the decoding options.
+ *
+ * @param options Pointer to the decoding options.
+ * @param colorSpace Pointer to the color space, {@link ColorSpaceName}.
+ * @return Returns one of the following result codes:
+ * {@link IMAGE_SUCCESS}: if the execution is successful.
+ * {@link IMAGE_SOURCE_INVALID_PARAMETER}: if options or colorSpace is 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}: if the execution is successful.
+ * {@link IMAGE_SOURCE_INVALID_PARAMETER}: if 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.
*
@@ -648,6 +684,18 @@ Image_ErrorCode OH_DecodingOptionsForPicture_SetDesiredAuxiliaryPictures(OH_Deco
* @since 13
*/
Image_ErrorCode OH_DecodingOptionsForPicture_Release(OH_DecodingOptionsForPicture *options);
+
+/**
+ * @brief Obtains the supported image formats that can be decoded.
+ *
+ * @param supportedFormats Double pointer to an array of the supported image formats.
+ * @param length Pointer to the length of the array.
+ * @return One of the following result codes:
+ * {@link IMAGE_SUCCESS} if the execution is successful.
+ * {@link IMAGE_SOURCE_INVALID_PARAMETER} if supportedFormats or length is empty.
+ * @since 20
+ */
+Image_ErrorCode OH_ImageSourceNative_GetSupportedFormats(Image_MimeType **supportedFormats, size_t *length);
#ifdef __cplusplus
};
#endif
diff --git a/multimedia/image_framework/libimage_packer.ndk.json b/multimedia/image_framework/libimage_packer.ndk.json
index ea2143d7ccec983a882b01e21072723bcbae656c..284840815710a6f297859df04b841f2b99da95de 100644
--- a/multimedia/image_framework/libimage_packer.ndk.json
+++ b/multimedia/image_framework/libimage_packer.ndk.json
@@ -122,5 +122,9 @@
{
"first_introduced": "12",
"name": "OH_ImagePackerNative_Release"
+ },
+ {
+ "first_introduced": "20",
+ "name": "OH_ImagePackerNative_GetSupportedFormats"
}
]
\ No newline at end of file
diff --git a/multimedia/image_framework/libimage_source.ndk.json b/multimedia/image_framework/libimage_source.ndk.json
index 877bae5741ec1a1d666bd2abf1d7293180a057b3..e95669459f45398227a1c26c25a9bef11af8a926 100644
--- a/multimedia/image_framework/libimage_source.ndk.json
+++ b/multimedia/image_framework/libimage_source.ndk.json
@@ -15,6 +15,10 @@
"first_introduced": "12",
"name": "OH_ImageSourceInfo_GetDynamicRange"
},
+ {
+ "first_introduced": "20",
+ "name": "OH_ImageSourceInfo_GetMimeType"
+ },
{
"first_introduced": "12",
"name": "OH_ImageSourceInfo_Release"
@@ -87,6 +91,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"
@@ -166,5 +178,9 @@
{
"first_introduced": "13",
"name": "OH_DecodingOptionsForPicture_Release"
+ },
+ {
+ "first_introduced": "20",
+ "name": "OH_ImageSourceNative_GetSupportedFormats"
}
]
\ No newline at end of file