Fix thumbnail format PNG to JPG for improve performace 67/233767/1 accepted/tizen/5.5/unified/20200522.160159 submit/tizen_5.5/20200520.013312
authorMinje Ahn <minje.ahn@samsung.com>
Tue, 19 May 2020 05:00:59 +0000 (14:00 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Tue, 19 May 2020 05:00:59 +0000 (14:00 +0900)
Since jpeg has exif, rotation is unnecessary.
GraphicsMagicK retains the original exif.

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

index 535402a..9353abe 100644 (file)
@@ -704,7 +704,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);
        }
 
        SAFE_FREE(thumb_dir);