diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2017-05-05 18:50:51 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-05-06 08:07:16 -0700 |
commit | 59bbaa78203fafe3f66ed34c281733fe6eea0940 (patch) | |
tree | ef7dd5be336454874eb9199c020f0b789de92037 /desktop-widgets | |
parent | 0617308b392921dabda9820a3e738776630dd2cb (diff) | |
download | subsurface-59bbaa78203fafe3f66ed34c281733fe6eea0940.tar.gz |
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 <sfuchs@gmx.de>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/simplewidgets.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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; } |