1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-27 03:29:16 +02:00

Added workaround for broken GPS IFD entries produced by NOKIA phones

Closes #260
This commit is contained in:
2020-01-16 22:54:12 +01:00
parent 37215959b8
commit a486abb159
2 changed files with 5 additions and 1 deletions

View File

@ -82,7 +82,10 @@ double EXIFParser::altitude(TIFFFile &file, const IFDEntry &alt,
double EXIFParser::coordinate(TIFFFile &file, const IFDEntry &ll) const
{
if (!(ll.type == TIFF_RATIONAL && ll.count == 3))
// Some broken image creators like NOKIA phones use a wrong (SRATIONAL)
// data type
if (!((ll.type == TIFF_RATIONAL || ll.type == TIFF_SRATIONAL)
&& ll.count == 3))
return NAN;
if (!file.seek(ll.offset))