diff --git a/multimedia/image_framework/include/image/image_common.h b/multimedia/image_framework/include/image/image_common.h index a567e46151cc279c9c49300171ce17a65036aa57..526b5b3ea57ae26c74b37ace22db0ba0c3e1b19c 100644 --- a/multimedia/image_framework/include/image/image_common.h +++ b/multimedia/image_framework/include/image/image_common.h @@ -146,6 +146,22 @@ typedef enum { IMAGE_ENCODE_FAILED = 7800301, } Image_ErrorCode; +/** + * @brief Enumerates the resolution quality that may be used by the interface. + * + * @since 12 + */ +typedef enum { + /** Highest quality images, longer decoding time */ + IMAGE_RESOLUTION_QUALITY_SUPER = 0, + /** High quality images, shorter decoding time than SUPER, longer than MEDIUM */ + IMAGE_RESOLUTION_QUALITY_HIGH = 1, + /** Medium quality images, moderate decoding time */ + IMAGE_RESOLUTION_QUALITY_MEDIUM = 2, + /** Low quality images, short decoding time */ + IMAGE_RESOLUTION_QUALITY_LOW = 3, + } Image_ResolutionQuality; + /** * @brief Defines the bmp mime type. * diff --git a/multimedia/image_framework/include/image/image_source_native.h b/multimedia/image_framework/include/image/image_source_native.h index c172388ee9fbaae60a99d2cb68ba0b619a6cd837..fc146c9a7e7c89ca039995d37e18b3394886282a 100644 --- a/multimedia/image_framework/include/image/image_source_native.h +++ b/multimedia/image_framework/include/image/image_source_native.h @@ -222,6 +222,30 @@ Image_ErrorCode OH_DecodingOptions_GetDesiredRegion(OH_DecodingOptions *options, Image_ErrorCode OH_DecodingOptions_SetDesiredRegion(OH_DecodingOptions *options, Image_Region *desiredRegion); +/** + * @brief Get Resolution Quality for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param resolutionQuality the pointer of image resolution quality. + * @return Returns {@link Image_ErrorCode} + * @see OH_DecodingOptions_GetResolutionQuality + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_GetResolutionQuality(OH_DecodingOptions *options, + int32_t *resolutionQuality); + +/** + * @brief Set Resolution Quality for DecodingOptions struct. + * + * @param options The DecodingOptions pointer will be operated. + * @param resolutionQuality the number of image resolutionQuality. + * @return Returns {@link Image_ErrorCode} + * @see OH_DecodingOptions_SetResolutionQuality + * @since 12 + */ +Image_ErrorCode OH_DecodingOptions_SetResolutionQuality(OH_DecodingOptions *options, + int32_t resolutionQuality); + /** * @brief delete OH_DecodingOptions pointer. * diff --git a/multimedia/image_framework/libimage_source.ndk.json b/multimedia/image_framework/libimage_source.ndk.json index 0c91a11dc91875be9bd2e415bba9fc72ee9c470b..f7209bbf7561ed8e06911107e992218316b338f5 100644 --- a/multimedia/image_framework/libimage_source.ndk.json +++ b/multimedia/image_framework/libimage_source.ndk.json @@ -59,6 +59,14 @@ "first_introduced": "12", "name": "OH_DecodingOptions_SetDesiredRegion" }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_GetResolutionQuality" + }, + { + "first_introduced": "12", + "name": "OH_DecodingOptions_SetResolutionQuality" + }, { "first_introduced": "12", "name": "OH_DecodingOptions_Release"