summaryrefslogtreecommitdiff
path: root/src/media-thumb-internal.c
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2017-01-05 01:29:27 (GMT)
committerJiyong Min <jiyong.min@samsung.com>2017-01-06 01:13:49 (GMT)
commit4dbb5ac1497b4e4a9cfe1c96588ed21095976238 (patch)
tree0329a6562fa5f88247beb736be9b8a79b086e69e /src/media-thumb-internal.c
parent41f9e742eaaec289a74a0cbcc835bc2a7e7555e7 (diff)
downloadlibmedia-thumbnail-4dbb5ac1497b4e4a9cfe1c96588ed21095976238.zip
libmedia-thumbnail-4dbb5ac1497b4e4a9cfe1c96588ed21095976238.tar.gz
libmedia-thumbnail-4dbb5ac1497b4e4a9cfe1c96588ed21095976238.tar.bz2
Add orientation for thumbnail-utilrefs/changes/07/108807/1
Fix code for thumbnail ratio when use thumbnail-util API Change-Id: I2186f79c1155f5ca60aeab8c86d3a245367139cf Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/media-thumb-internal.c')
-rwxr-xr-xsrc/media-thumb-internal.c10
1 files changed, 9 insertions, 1 deletions
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) {