diff options
author | jiyong.min <jiyong.min@samsung.com> | 2023-02-03 17:03:24 +0900 |
---|---|---|
committer | jiyong.min <jiyong.min@samsung.com> | 2023-02-03 17:12:09 +0900 |
commit | 0152e16389429e9d0e9b53178c20cc9442ddec5a (patch) | |
tree | 28fddf635ea8a64e9d100d89dbcf156826d4e21b | |
parent | 01606a067b26334aa17751aba1f29d6e78a66f82 (diff) | |
download | libmedia-thumbnail-0152e16389429e9d0e9b53178c20cc9442ddec5a.tar.gz libmedia-thumbnail-0152e16389429e9d0e9b53178c20cc9442ddec5a.tar.bz2 libmedia-thumbnail-0152e16389429e9d0e9b53178c20cc9442ddec5a.zip |
Adjust the limits on allowable image sizesubmit/tizen_6.0/20230203.082503accepted/tizen/6.0/unified/20230206.045625
Change-Id: Iad095907146bca788c29baaf00e61374aade757b
-rwxr-xr-x | src/media-thumbnail.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c index 01dad84..b8ecdee 100755 --- a/src/media-thumbnail.c +++ b/src/media-thumbnail.c @@ -29,8 +29,10 @@ #include "media-thumb-internal.h" #include "media-thumb-ipc.h" -/* The maximum of resolution to be able to get thumbnail is 3000 x 3000, except for only jpeg */ -#define THUMB_MAX_ALLOWED_MEM_FOR_THUMB 9000000 +#if defined(WITH_DA_PROFILE) +/* The maximum of resolution to be able to get thumbnail is 3000 x 2000, except for only jpeg */ +#define THUMB_MAX_ALLOWED_MEM_FOR_THUMB 6000000 +#endif #define THUMB_MAX_ALLOWED_RESOLUTION 2000 int thumbnail_request_from_db_async(unsigned int request_id, const char *origin_path, ThumbFunc func, void *user_data, uid_t uid) @@ -518,7 +520,7 @@ static int __get_image_info(const char *path, unsigned int *width, unsigned int thumb_retvm_if(image_type == IMG_CODEC_UNKNOWN_TYPE, MS_MEDIA_ERR_UNSUPPORTED_CONTENT, "Unsupported image codec"); #if defined(WITH_DA_PROFILE) - if (image_w * image_h > THUMB_MAX_ALLOWED_MEM_FOR_THUMB) { + if (image_w * image_h >= THUMB_MAX_ALLOWED_MEM_FOR_THUMB) { thumb_warn("This original image is too big. w[%d] h[%d] size limit[%d]", image_w, image_h, THUMB_MAX_ALLOWED_MEM_FOR_THUMB); return MS_MEDIA_ERR_UNSUPPORTED_CONTENT; } |