fix extraction of GPS altitude for exif data
ClosedPublic

Authored by astippich on Nov 2 2018, 8:17 PM.

Details

Summary

The previous code always failed, since the altitude
is given with only a single rational value
below or above sea level.

Diff Detail

Repository
R286 KFileMetaData
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
astippich created this revision.Nov 2 2018, 8:17 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptNov 2 2018, 8:17 PM
Restricted Application added subscribers: Baloo, kde-frameworks-devel. · View Herald Transcript
astippich requested review of this revision.Nov 2 2018, 8:17 PM
bruns requested changes to this revision.Nov 8 2018, 10:39 PM
bruns added inline comments.
src/extractors/exiv2extractor.cpp
285
This revision now requires changes to proceed.Nov 8 2018, 10:39 PM
astippich added inline comments.Nov 10 2018, 1:56 PM
src/extractors/exiv2extractor.cpp
285

true, but why not use the converted value directly? Otherwise the conversion would have to be made manually by dividing, see fetchGpsDouble()

astippich edited the summary of this revision. (Show Details)Nov 10 2018, 5:01 PM
bruns accepted this revision.Dec 1 2018, 12:30 AM
bruns added inline comments.
src/extractors/exiv2extractor.cpp
217

This is bogus, why am I not allowed to take photos at sea level? Or in Greenwhich, at the Equator?

Invalid data should not be signaled by 0.0

285

You are correct, the implicit conversions done by Exiv2 are easy to miss.

294

You could return std::numeric_limits<double>::quiet_NaN() here for the error case.

This revision is now accepted and ready to land.Dec 1 2018, 12:30 AM

Thanks

src/extractors/exiv2extractor.cpp
217

Yep, I will change that in another diff

This revision was automatically updated to reflect the committed changes.