diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/util.c | 25 |
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; +} |