From: Minje Ahn Date: Wed, 11 Mar 2020 05:08:00 +0000 (+0900) Subject: Changed default thumbnail format to png X-Git-Tag: accepted/tizen/unified/20200312.234345~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=838ab99691457ae0790b5fbe7d30f09810d1a94e;p=platform%2Fcore%2Fmultimedia%2Flibmedia-service.git Changed default thumbnail format to png Change to save thumbnails as png, regardless of the format of the original image. Change-Id: I828a21f72b8c4a836c3f55c23b3966cfbc20819b Signed-off-by: Minje Ahn --- diff --git a/src/common/media-svc-util.c b/src/common/media-svc-util.c index 02dbfef..eafa52e 100644 --- a/src/common/media-svc-util.c +++ b/src/common/media-svc-util.c @@ -706,10 +706,7 @@ int _media_svc_get_thumbnail_path(media_svc_media_type_e media_type, char *thumb snprintf(thumb_path, MEDIA_SVC_PATHNAME_SIZE, "%s/.%s-%s.%s", thumb_dir, file_ext, hash, thumbfile_ext); } else { - if (strcasecmp(file_ext, "PNG") == 0) - snprintf(thumb_path, MEDIA_SVC_PATHNAME_SIZE, "%s/.%s-%s.png", thumb_dir, file_ext, hash); - else - snprintf(thumb_path, MEDIA_SVC_PATHNAME_SIZE, "%s/.%s-%s.jpg", thumb_dir, file_ext, hash); + snprintf(thumb_path, MEDIA_SVC_PATHNAME_SIZE, "%s/.%s-%s.png", thumb_dir, file_ext, hash); } SAFE_FREE(thumb_dir); @@ -1645,7 +1642,7 @@ int _media_svc_create_thumbnail(const char *path, char *thumb_path, media_svc_me media_svc_sec_debug("Path[%s] Type[%d]", path, media_type); //1. make hash path - ret = _media_svc_get_thumbnail_path(media_type, thumb_path, path, THUMB_EXT, uid); + ret = _media_svc_get_thumbnail_path(media_type, thumb_path, path, NULL, uid); if (ret != MS_MEDIA_ERR_NONE) { media_svc_error("_media_svc_get_thumbnail_path failed - %d", ret); SAFE_STRLCPY(thumb_path, "", MAX_FILEPATH_LEN); diff --git a/src/include/common/media-svc-env.h b/src/include/common/media-svc-env.h index e7987f3..bdd0104 100755 --- a/src/include/common/media-svc-env.h +++ b/src/include/common/media-svc-env.h @@ -131,7 +131,6 @@ extern "C" { #define MEDIA_SVC_TAG_UNKNOWN "" -#define THUMB_EXT "jpg" #define THUMB_MAX_ALLOWED_MEM 9000000 #define THUMB_WIDTH 320 #define THUMB_HEIGHT 240