From 59bbaa78203fafe3f66ed34c281733fe6eea0940 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Fri, 5 May 2017 18:50:51 +0200 Subject: Image import: Make Exif handling more tolerant, better info,... Changes to the "Add pictures to dive" function: - Make Exif handling more tolerant by removing the JPG sanity check for EOI - Give info to user if exif.cpp can't identify a Exif date/time - Restrict file dialog filter for correct picture time by DC photo to JPG because Exif is only available from JPG Signed-off-by: Stefan Fuchs --- desktop-widgets/simplewidgets.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index 8d3b94e8f..f985a0f01 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -309,7 +309,7 @@ void ShiftImageTimesDialog::syncCameraClicked() QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open image file"), DiveListView::lastUsedImageDir(), - tr("Image files (*.jpg *.jpeg *.pnm *.tif *.tiff)")); + tr("Image files (*.jpg *.jpeg)")); if (fileNames.isEmpty()) return; @@ -401,7 +401,10 @@ void ShiftImageTimesDialog::updateInvalid() // We've found invalid image timestamp = picture_get_timestamp(fileName.toUtf8().data()); time_first.setTime_t(timestamp + m_amount); - ui.invalidFilesText->append(fileName + " " + time_first.toString()); + if (timestamp == 0) + ui.invalidFilesText->append(fileName + " - " + tr("No Exif date/time found")); + else + ui.invalidFilesText->append(fileName + " - " + time_first.toString()); allValid = false; } -- cgit v1.2.3-70-g09d2