From 66b113396b0fa28f82466c098ca0ec0a956ffd4f Mon Sep 17 00:00:00 2001 From: Seokpil Park Date: Tue, 13 Aug 2013 22:06:30 +0900 Subject: [PATCH] [content] Fix extracting orientation because of changing hardware Change-Id: I5ce686834e737ef7b0cfc860a88b74ca20045f52 Signed-off-by: Seokpil Park --- src/FCnt_ContentManagerUtilImpl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/FCnt_ContentManagerUtilImpl.cpp b/src/FCnt_ContentManagerUtilImpl.cpp index 25754d4..10d08e4 100755 --- a/src/FCnt_ContentManagerUtilImpl.cpp +++ b/src/FCnt_ContentManagerUtilImpl.cpp @@ -123,6 +123,7 @@ _ContentManagerUtilImpl::GetImageMetaN(const String& contentPath, bool internal) char latitudeRef = 0; // to store latitude reference (quadrasphere designation 'N', 'S', 'W' or 'E') char longitudeRef = 0; // to store longitude reference (quadrasphere designation 'N', 'S', 'W' or 'E') unsigned int entryCount = 0; + bool isOrientation = false; for (int i = 0; i < EXIF_IFD_COUNT; i++) { @@ -162,11 +163,13 @@ _ContentManagerUtilImpl::GetImageMetaN(const String& contentPath, bool internal) SysTryReturn(NID_CNT, pMetadata->pDateTime != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient."); } - else if (tag == EXIF_TAG_ORIENTATION) + else if (tag == EXIF_TAG_ORIENTATION && !isOrientation) { //get the byte order(little endian or big endian) before extracting orientation type byteOrder = exif_data_get_byte_order(pEntries[j]->parent->parent); pMetadata->orientation = static_cast(exif_get_short(pEntries[j]->data, byteOrder)); + + isOrientation = true; } else if (tag == EXIF_TAG_SOFTWARE) { -- 2.7.4