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:
@ -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))
|
||||
|
Reference in New Issue
Block a user