summaryrefslogtreecommitdiff
path: root/src/util/util.c
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2015-12-17 08:45:09 (GMT)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2015-12-17 08:45:09 (GMT)
commite2869dedc9d87dc1e9dbe208a8b96a0466e27007 (patch)
treee5390ccd9314c377c510140da612765f8ef1cccb /src/util/util.c
parent96d3912f199a4217f51f18a8b34b8be4e7886496 (diff)
parentfc311ca6d84a99fb53925488b9e5505e606de70d (diff)
downloadair_mediahub-e2869dedc9d87dc1e9dbe208a8b96a0466e27007.zip
air_mediahub-e2869dedc9d87dc1e9dbe208a8b96a0466e27007.tar.gz
air_mediahub-e2869dedc9d87dc1e9dbe208a8b96a0466e27007.tar.bz2
Merge "viewer: set image orient" into tizensubmit/tizen/20151218.013900accepted/tizen/tv/20151218.044156
Diffstat (limited to 'src/util/util.c')
-rw-r--r--src/util/util.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/util/util.c b/src/util/util.c
index 4a4f833..38e8e75 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -424,3 +424,28 @@ void util_create_thumbnail(Evas_Object *grid, app_media *am,
if (r != MEDIA_CONTENT_ERROR_NONE)
_ERR("failed to create thumbnail");
}
+
+Elm_Image_Orient util_get_orient(media_content_orientation_e orient)
+{
+ Elm_Image_Orient o;
+
+ switch (orient) {
+ case MEDIA_CONTENT_ORIENTATION_NORMAL:
+ o = ELM_IMAGE_ORIENT_0;
+ break;
+ case MEDIA_CONTENT_ORIENTATION_ROT_90:
+ o = ELM_IMAGE_ROTATE_90;
+ break;
+ case MEDIA_CONTENT_ORIENTATION_ROT_180:
+ o = ELM_IMAGE_ROTATE_180;
+ break;
+ case MEDIA_CONTENT_ORIENTATION_ROT_270:
+ o = ELM_IMAGE_ROTATE_270;
+ break;
+ default:
+ o = ELM_IMAGE_ORIENT_NONE;
+ break;
+ }
+
+ return o;
+}