Fix thumbnail format PNG to JPG for improve performace 64/233764/5 accepted/tizen/unified/20200601.051622 submit/tizen/20200529.021017
authorMinje Ahn <minje.ahn@samsung.com>
Tue, 19 May 2020 04:26:46 +0000 (13:26 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Thu, 21 May 2020 01:48:51 +0000 (10:48 +0900)
PNG needs more time when encoding/decoding.

Change-Id: I312d0d62924f28c612baadc1bb94d886530e0b26
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/common/media-svc-util.c

index 4847673..2da5c75 100644 (file)
@@ -717,7 +717,10 @@ 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 {
-               snprintf(thumb_path, MEDIA_SVC_PATHNAME_SIZE, "%s/.%s-%s.png", thumb_dir, file_ext, hash);
+               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);
        }
 
        g_free(thumb_dir);