Skip to content

Commit

Permalink
Show acquisition date from RAW metadata in window title
Browse files Browse the repository at this point in the history
  • Loading branch information
qbnu committed Oct 5, 2023
1 parent 2818432 commit cdb8384
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/JPEGView/MainDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "ResizeFilter.h"
#include "EXIFReader.h"
#include "EXIFHelpers.h"
#include "RawMetadata.h"
#include "ProcessingThreadPool.h"
#include "PaintMemDCMgr.h"
#include "PanelMgr.h"
Expand Down Expand Up @@ -3233,8 +3234,11 @@ void CMainDlg::UpdateWindowTitle() {
sWindowText += Helpers::GetMultiframeIndex(m_pCurrentImage);
if (CSettingsProvider::This().ShowEXIFDateInTitle()) {
CEXIFReader* pEXIF = m_pCurrentImage->GetEXIFReader();
CRawMetadata* pRawMetadata = m_pCurrentImage->GetRawMetadata();
if (pEXIF != NULL && pEXIF->GetAcquisitionTime().wYear > 1600) {
sWindowText += " - " + Helpers::SystemTimeToString(pEXIF->GetAcquisitionTime());
} else if (pRawMetadata != NULL && pRawMetadata->GetAcquisitionTime().wYear > 1985) {
sWindowText += " - " + Helpers::SystemTimeToString(pRawMetadata->GetAcquisitionTime());
}
}
sWindowText += " - " + CString(JPEGVIEW_TITLE);
Expand Down

0 comments on commit cdb8384

Please sign in to comment.