From 359099aa8ea613f3f0a691f0f84f904d9651eaef Mon Sep 17 00:00:00 2001 From: chitta ranjan Date: Fri, 22 Mar 2013 12:08:29 +0900 Subject: [PATCH] Fixed jira issue N_SE-26400 Change-Id: I7ab8a52ae5774bc641e325fa52da4d924277810d Signed-off-by: chitta ranjan --- src/IvImageViewerForm.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/IvImageViewerForm.cpp b/src/IvImageViewerForm.cpp index a8c3901..a81fcb3 100644 --- a/src/IvImageViewerForm.cpp +++ b/src/IvImageViewerForm.cpp @@ -625,16 +625,16 @@ ImageViewerForm::InitializePanelDetail() if (i == DETAIL_COUNT_MAX - 1) { __pDetail_FileInfo_Value_Label[i]->Construct( - Rectangle(X_DETAIL_FILEINFO_LABEL, - GAP_H_DETAIL_TEXT * (i + 1) + H_DETAIL_MAIN_TEXT + (H_DETAIL_MAIN_TEXT * i) + H_DETAIL_SUB_TEXT * (i + 1), - clientRect.width - GAP_W_END_OF_LABEL, H_DETAIL_FILEINFO_VALUE_LABEL * 3), L""); + Rectangle(X_DETAIL_FILEINFO_LABEL, + GAP_H_DETAIL_TEXT * (i + 1) + H_DETAIL_MAIN_TEXT + (H_DETAIL_MAIN_TEXT * i) + H_DETAIL_SUB_TEXT * (i + 1), + clientRect.width - GAP_W_END_OF_LABEL, H_DETAIL_FILEINFO_VALUE_LABEL * 3), L""); } else { __pDetail_FileInfo_Value_Label[i]->Construct( - Rectangle(X_DETAIL_FILEINFO_LABEL, - GAP_H_DETAIL_TEXT * (i + 1) + H_DETAIL_MAIN_TEXT + (H_DETAIL_MAIN_TEXT * i) + H_DETAIL_SUB_TEXT * (i + 1), - clientRect.width - GAP_W_END_OF_LABEL, H_DETAIL_FILEINFO_VALUE_LABEL), L""); + Rectangle(X_DETAIL_FILEINFO_LABEL, + GAP_H_DETAIL_TEXT * (i + 1) + H_DETAIL_MAIN_TEXT + (H_DETAIL_MAIN_TEXT * i) + H_DETAIL_SUB_TEXT * (i + 1), + clientRect.width - GAP_W_END_OF_LABEL, H_DETAIL_FILEINFO_VALUE_LABEL), L""); } __pScrollPanel->AddControl(*__pDetail_FileInfo_Value_Label[i]); @@ -1620,7 +1620,7 @@ ImageViewerForm::OnTimerExpired(Timer &timer) if (__pPresentationModel->GetFileCount() > 1) { __pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, - ENTRY_NAME_IMAGE_VIEWER_REPEAT_VALUE, repeatValue); + ENTRY_NAME_IMAGE_VIEWER_REPEAT_VALUE, repeatValue); if( repeatValue == 0) { @@ -1785,7 +1785,7 @@ ImageViewerForm::OnRequestMessagesAction(void) HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); pDataList->Construct(); pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), - new (std::nothrow) String(filePath)); + new (std::nothrow) String(filePath)); pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(APPCONTROL_DATA_MMS)); @@ -1884,26 +1884,26 @@ ImageViewerForm::GetQuickThumbnailN(String& filePath) if (pBitmap != null) { ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath); + if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_IMAGE) { - ImageMetadata* pImgMeta = ContentManagerUtil::GetImageMetaN(filePath); - - if (pImgMeta != null) - { - Dimension srcDim(pImgMeta->GetWidth(), pImgMeta->GetHeight()); - pBitmap->Scale(srcDim); - delete pImgMeta; - } - else + ImageBuffer* imageBuffer = new (std::nothrow) ImageBuffer(); + result r = imageBuffer->Construct(filePath); + if (r == E_SUCCESS) { - ImageBuffer* imageBuffer = new (std::nothrow) ImageBuffer(); - result r = imageBuffer->Construct(filePath); - if (r == E_SUCCESS) + if ( imageBuffer->GetExifOrientation() == EXIF_ORIENTATION_RIGHT_TOP || + imageBuffer->GetExifOrientation() == EXIF_ORIENTATION_LEFT_BOTTOM) + { + Dimension srcDim( imageBuffer->GetHeight(),imageBuffer->GetWidth()); + pBitmap->Scale(srcDim); + } + else { Dimension srcDim(imageBuffer->GetWidth(), imageBuffer->GetHeight()); pBitmap->Scale(srcDim); - delete imageBuffer; } + + delete imageBuffer; } } else if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_VIDEO) -- 2.7.4