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>
This commit is contained in:
Stefan Fuchs 2017-05-05 18:50:51 +02:00 committed by Dirk Hohndel
parent 0617308b39
commit 59bbaa7820
2 changed files with 5 additions and 19 deletions

View file

@ -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;
}