From: Minje Ahn Date: Thu, 5 Jan 2017 01:29:27 +0000 (+0900) Subject: Add orientation for thumbnail-util X-Git-Tag: accepted/tizen/common/20170116.181407~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F07%2F108807%2F1;p=platform%2Fcore%2Fmultimedia%2Flibmedia-thumbnail.git Add orientation for thumbnail-util Fix code for thumbnail ratio when use thumbnail-util API Change-Id: I2186f79c1155f5ca60aeab8c86d3a245367139cf Signed-off-by: Minje Ahn --- diff --git a/packaging/libmedia-thumbnail.spec b/packaging/libmedia-thumbnail.spec index 9583720..fad5e85 100644 --- a/packaging/libmedia-thumbnail.spec +++ b/packaging/libmedia-thumbnail.spec @@ -1,6 +1,6 @@ Name: libmedia-thumbnail Summary: Media thumbnail service library for multimedia applications -Version: 0.1.100 +Version: 0.1.101 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 and public domain diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c index 2790c2b..dfa825b 100755 --- a/src/media-thumb-internal.c +++ b/src/media-thumb-internal.c @@ -1214,10 +1214,18 @@ int _media_thumb_jpeg(const char *origin_path, exif_data_unref(ed); } + } else { + ed = exif_data_new_from_file(origin_path); + if (ed) { + err = _media_thumb_get_exif_info(ed, NULL, 0, &orientation, EXIF_IFD_0, EXIF_TAG_ORIENTATION); + if (err != MS_MEDIA_ERR_NONE) { + thumb_warn("_media_thumb_get_exif_info failed"); + } + exif_data_unref(ed); + } } if (!thumb_done) { - err = _media_thumb_decode_with_evas(origin_path, thumb_width, thumb_height, thumb_info, 1, orientation); if (err != MS_MEDIA_ERR_NONE) {