diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index 29d7be412e896f23e69ac363da31165fab71d8f6..0129bb83eab801946a735a836215144dcd7c4146 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -166,7 +166,8 @@ typedef enum { IMAGE_UNSUPPORTED_CONVERSION = 7600203, /** invalid region */ IMAGE_INVALID_REGION = 7600204, - /** @error unsupported memory format + /** + * @error unsupported memory format * @since 13 */ IMAGE_UNSUPPORTED_MEMORY_FORMAT = 7600205, @@ -272,19 +273,19 @@ typedef enum { typedef enum { /** * The system determines which memory to use to create the PixelMap. - * + * * @since 20 */ IMAGE_ALLOCATOR_MODE_AUTO = 0, /** * Use DMA buffer to create the PixelMap. - * + * * @since 20 */ IMAGE_ALLOCATOR_MODE_DMA = 1, /** * Use share memory to create the PixelMap. - * + * * @since 20 */ IMAGE_ALLOCATOR_MODE_SHARED_MEMORY = 2, @@ -331,9 +332,9 @@ Image_ErrorCode OH_PictureMetadata_GetProperty(OH_PictureMetadata *metadata, Ima * @since 13 */ Image_ErrorCode OH_PictureMetadata_SetProperty(OH_PictureMetadata *metadata, Image_String *key, Image_String *value); - + /** - * @brief Obtains the property of picture metadata. The output value.data is null-terminated. + * @brief Obtains the property of picture metadata. The output value.data is null-terminated. * * @param metadata Pointer to OH_PictureMetadata. * @param key Pointer to property's key. @@ -1596,14 +1597,14 @@ static const char *OHOS_IMAGE_PROPERTY_FRAGMENT_WIDTH = "FragmentImageWidth"; static const char *OHOS_IMAGE_PROPERTY_FRAGMENT_HEIGHT = "FragmentImageHeight"; /** - * @brief Delay time of each frame in a GIF image in milliseconds. + * @brief Delay of each frame in a GIF image, in milliseconds. * * @since 20 */ static const char *IMAGE_PROPERTY_GIF_DELAY_TIME = "GifDelayTime"; /** - * @brief Disposal type of each frame in gif. + * @brief Disposal type of each frame in a GIF image. * * @since 20 */ diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index 1a970bfae715102748875123e9db5a0c00d286b2..56d6b31657efa259da8d43a53dacb4d5522c50e1 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -180,13 +180,13 @@ Image_ErrorCode OH_ImageSourceInfo_GetDynamicRange(OH_ImageSource_Info *info, bo * @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. + * @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. + * {@link IMAGE_SUCCESS} if the execution is successful. + * {@link IMAGE_SOURCE_INVALID_PARAMETER} if info or mimetype is a null pointer. * @since 20 */ -Image_ErrorCode OH_ImageSourceInfo_GetMimeType(OH_ImageSource_Info *info, Image_MimeType *mimeType); +Image_ErrorCode OH_ImageSourceInfo_GetMimeType(OH_ImageSource_Info *info, Image_MimeType *mimetype); /** * @brief delete OH_ImageSource_Info pointer. @@ -375,52 +375,52 @@ Image_ErrorCode OH_DecodingOptions_SetDesiredDynamicRange(OH_DecodingOptions *op int32_t desiredDynamicRange); /** - * @brief Sets the crop region for the decoding options. + * @brief Obtains the color space set in the decoding options. * * @param options Pointer to the decoding options. - * @param cropRegion The target region will be cropped from the image. + * @param colorSpace Pointer to the color space. * @return Returns one of the following result codes: * {@link IMAGE_SUCCESS} if the execution is successful. - * {@link IMAGE_SOURCE_INVALID_PARAMETER} if options or cropRegion is null pointer. - * @since 19 + * {@link IMAGE_SOURCE_INVALID_PARAMETER} if options or colorSpace is null pointer. + * @since 20 */ -Image_ErrorCode OH_DecodingOptions_SetCropRegion(OH_DecodingOptions *options, Image_Region *cropRegion); +Image_ErrorCode OH_DecodingOptions_GetDesiredColorSpace(OH_DecodingOptions *options, int32_t *colorSpace); /** - * @brief Gets the crop region for the decoding options. + * @brief Sets the desired color space for the decoding options. * * @param options Pointer to the decoding options. - * @param cropRegion The target region will be cropped from the image. + * @param colorSpace Desired color space. * @return Returns one of the following result codes: * {@link IMAGE_SUCCESS} if the execution is successful. - * {@link IMAGE_SOURCE_INVALID_PARAMETER} if options or cropRegion is null pointer. - * @since 19 + * {@link IMAGE_SOURCE_INVALID_PARAMETER} if options is a null pointer or colorSpace is not supported. + * @since 20 */ -Image_ErrorCode OH_DecodingOptions_GetCropRegion(OH_DecodingOptions *options, Image_Region *cropRegion); +Image_ErrorCode OH_DecodingOptions_SetDesiredColorSpace(OH_DecodingOptions *options, int32_t colorSpace); /** - * @brief Obtains the color space set in the decoding options. + * @brief Sets the crop region for the decoding options. * * @param options Pointer to the decoding options. - * @param colorSpace Pointer to the color space, {@link ColorSpaceName}. + * @param cropRegion The target region will be cropped from the image. * @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 + * {@link IMAGE_SUCCESS} if the execution is successful. + * {@link IMAGE_SOURCE_INVALID_PARAMETER} if options or cropRegion is null pointer. + * @since 19 */ -Image_ErrorCode OH_DecodingOptions_GetDesiredColorSpace(OH_DecodingOptions *options, int32_t *colorSpace); +Image_ErrorCode OH_DecodingOptions_SetCropRegion(OH_DecodingOptions *options, Image_Region *cropRegion); /** - * @brief Sets desired color space for decoding options. + * @brief Gets the crop region for the decoding options. * * @param options Pointer to the decoding options. - * @param colorSpace Desired color space, {@link ColorSpaceName}. + * @param cropRegion The target region will be cropped from the image. * @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 + * {@link IMAGE_SUCCESS} if the execution is successful. + * {@link IMAGE_SOURCE_INVALID_PARAMETER} if options or cropRegion is null pointer. + * @since 19 */ -Image_ErrorCode OH_DecodingOptions_SetDesiredColorSpace(OH_DecodingOptions *options, int32_t colorSpace); +Image_ErrorCode OH_DecodingOptions_GetCropRegion(OH_DecodingOptions *options, Image_Region *cropRegion); /** * @brief delete OH_DecodingOptions pointer. @@ -728,7 +728,7 @@ Image_ErrorCode OH_DecodingOptionsForPicture_Release(OH_DecodingOptionsForPictur * {@link IMAGE_SOURCE_INVALID_PARAMETER} if supportedFormats or length is empty. * @since 20 */ -Image_ErrorCode OH_ImageSourceNative_GetSupportedFormats(Image_MimeType **supportedFormats, size_t *length); +Image_ErrorCode OH_ImageSourceNative_GetSupportedFormats(Image_MimeType** supportedFormats, size_t *length); #ifdef __cplusplus }; #endif diff --git a/multimedia/image_framework/libimage_source.ndk.json b/multimedia/image_framework/libimage_source.ndk.json index 2e8e996127f93cca4ef16682f0c8e57f33cd3081..2de9499ebd1b77d297e03c29355250c01a570488 100644 --- a/multimedia/image_framework/libimage_source.ndk.json +++ b/multimedia/image_framework/libimage_source.ndk.json @@ -83,14 +83,6 @@ "first_introduced": "18", "name": "OH_DecodingOptions_GetCropAndScaleStrategy" }, - { - "first_introduced": "19", - "name": "OH_DecodingOptions_SetCropRegion" - }, - { - "first_introduced": "19", - "name": "OH_DecodingOptions_GetCropRegion" - }, { "first_introduced": "20", "name": "OH_DecodingOptions_GetDesiredColorSpace" @@ -99,6 +91,14 @@ "first_introduced": "20", "name": "OH_DecodingOptions_SetDesiredColorSpace" }, + { + "first_introduced": "19", + "name": "OH_DecodingOptions_SetCropRegion" + }, + { + "first_introduced": "19", + "name": "OH_DecodingOptions_GetCropRegion" + }, { "first_introduced": "12", "name": "OH_DecodingOptions_Release"