summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2020-05-19 13:59:40 +0900
committerMinje Ahn <minje.ahn@samsung.com>2020-05-19 13:59:40 +0900
commit59540a52a0f0f3a9452f94ae9abb5814913b7d51 (patch)
treec14db7b12e4e1bec01bd0a5087c7bb27a3cc9256
parentae0afbc687587aa7784a4a9342b06b0e785eb207 (diff)
downloadlibmedia-thumbnail-59540a52a0f0f3a9452f94ae9abb5814913b7d51.tar.gz
libmedia-thumbnail-59540a52a0f0f3a9452f94ae9abb5814913b7d51.tar.bz2
libmedia-thumbnail-59540a52a0f0f3a9452f94ae9abb5814913b7d51.zip
Fix thumbnail format PNG to JPG for improve performacesubmit/tizen_5.5/20200520.013312accepted/tizen/5.5/unified/20200522.160156
Since jpeg has exif, rotation is unnecessary. GraphicsMagicK retains the original exif. Change-Id: I156dbb21b738be5393d3aee986b9f5a17615c377 Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
-rwxr-xr-xsrc/media-thumb-internal.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c
index bed7cd6..1854cd1 100755
--- a/src/media-thumb-internal.c
+++ b/src/media-thumb-internal.c
@@ -391,9 +391,12 @@ int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path
ret = ms_user_get_root_thumb_store_path(uid, &get_path);
SAFE_FREE(storage_id);
- if (get_path != NULL)
- ret_len = snprintf(thumb_hash_path, max_thumb_path - 1, "%s/.%s-%s.png", get_path, file_ext, hash_name);
-
+ if (get_path != NULL) {
+ if (strcasecmp(file_ext, "PNG") == 0)
+ ret_len = snprintf(thumb_hash_path, max_thumb_path - 1, "%s/.%s-%s.png", get_path, file_ext, hash_name);
+ else
+ ret_len = snprintf(thumb_hash_path, max_thumb_path - 1, "%s/.%s-%s.jpg", get_path, file_ext, hash_name);
+ }
SAFE_FREE(get_path);
if ((ret_len < 0) || (ret_len > (int)max_thumb_path)) {