From 4464684f2d4450b1f30c3d04fda7725b60691deb Mon Sep 17 00:00:00 2001 From: caochuan Date: Mon, 4 Mar 2024 15:40:29 +0800 Subject: [PATCH] =?UTF-8?q?Feature:=20Gif=E6=94=AF=E6=8C=81disposalType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: caochuan --- .../include/image_source_mdk.h | 35 +++++++++++++++++++ .../libimage_source_ndk.ndk.json | 4 +++ 2 files changed, 39 insertions(+) diff --git a/multimedia/image_framework/include/image_source_mdk.h b/multimedia/image_framework/include/image_source_mdk.h index 437e4816a..e18cea1a8 100644 --- a/multimedia/image_framework/include/image_source_mdk.h +++ b/multimedia/image_framework/include/image_source_mdk.h @@ -749,6 +749,41 @@ int32_t OH_ImageSource_CreatePixelMapList(const ImageSourceNative* native, int32_t OH_ImageSource_GetDelayTime(const ImageSourceNative* native, struct OhosImageSourceDelayTimeList* res); +/** + * @brief Obtains the disposal type list from some ImageSource objects (such as GIF image sources). + * + * @param native Indicates a pointer to the {@link ImageSourceNative} object at the C++ native layer. + * @param size Indicates the size of the disposal type list obtained. + * @param list Indicates a pointer to the disposal type list obtained. + * When the input list is a null pointer and size is 0, + * the size of the disposal type list is returned through size. + * To obtain the complete disposal type list, a space greater than size is required. + * @return Returns {@link IRNdkErrCode} IMAGE_RESULT_SUCCESS - if the operation is successful. + * returns {@link IRNdkErrCode} IMAGE_RESULT_BAD_PARAMETER - if bad parameter. + * returns {@link IRNdkErrCode} IMAGE_RESULT_JNI_ENV_ABNORMAL - if Abnormal JNI environment. + * returns {@link IRNdkErrCode} IMAGE_RESULT_INVALID_PARAMETER - if invalid parameter. + * returns {@link IRNdkErrCode} IMAGE_RESULT_GET_DATA_ABNORMAL - if image get data error. + * returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_FAILED - if decode fail. + * returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_HEAD_ABNORMAL - if image decode head error. + * returns {@link IRNdkErrCode} IMAGE_RESULT_CREATE_DECODER_FAILED - if create decoder failed. + * returns {@link IRNdkErrCode} IMAGE_RESULT_THIRDPART_SKIA_ERROR - if skia error. + * returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_ABNORMAL - if image input data error. + * returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_ABNORMAL - if image decode error. + * returns {@link IRNdkErrCode} IMAGE_RESULT_DATA_UNSUPPORT - if image init error. + * returns {@link IRNdkErrCode} IMAGE_RESULT_UNKNOWN_FORMAT - if image unknown format. + * returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_REGISTER_FAILED - if register plugin fail. + * returns {@link IRNdkErrCode} IMAGE_RESULT_PLUGIN_CREATE_FAILED - if create plugin fail. + * returns {@link IRNdkErrCode} IMAGE_RESULT_INDEX_INVALID - if invalid index. + * returns {@link IRNdkErrCode} IMAGE_RESULT_DECODE_EXIF_UNSUPPORT - if image decode exif unsupport. + * returns {@link IRNdkErrCode} IMAGE_RESULT_PROPERTY_NOT_EXIST - if image property not exist. + * @see {@link ImageSourceNative} + * + * @Syscap SystemCapability.Multimedia.Image + * @since 12 + * @version 5.0 + */ +int32_t OH_ImageSource_GetDisposalTypeList(const ImageSourceNative* native, size_t* size, int32_t* list); + /** * @brief Obtains the number of frames from an ImageSource object. * diff --git a/multimedia/image_framework/libimage_source_ndk.ndk.json b/multimedia/image_framework/libimage_source_ndk.ndk.json index 04f0e2331..50c29b74b 100644 --- a/multimedia/image_framework/libimage_source_ndk.ndk.json +++ b/multimedia/image_framework/libimage_source_ndk.ndk.json @@ -58,5 +58,9 @@ { "first_introduced": "11", "name": "OH_ImageSource_CreateIncrementalFromData" + }, + { + "first_introduced": "12", + "name": "OH_ImageSource_GetDisposalTypeList" } ] \ No newline at end of file -- Gitee