mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-18 19:52:09 +01:00
Added workaround for broken GPS IFD entries produced by NOKIA phones
Closes #260
This commit is contained in:
parent
37215959b8
commit
a486abb159
@ -9,6 +9,7 @@
|
|||||||
#define TIFF_SHORT 3
|
#define TIFF_SHORT 3
|
||||||
#define TIFF_LONG 4
|
#define TIFF_LONG 4
|
||||||
#define TIFF_RATIONAL 5
|
#define TIFF_RATIONAL 5
|
||||||
|
#define TIFF_SRATIONAL 10
|
||||||
#define TIFF_DOUBLE 12
|
#define TIFF_DOUBLE 12
|
||||||
|
|
||||||
class TIFFFile
|
class TIFFFile
|
||||||
|
@ -82,7 +82,10 @@ double EXIFParser::altitude(TIFFFile &file, const IFDEntry &alt,
|
|||||||
|
|
||||||
double EXIFParser::coordinate(TIFFFile &file, const IFDEntry &ll) const
|
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;
|
return NAN;
|
||||||
|
|
||||||
if (!file.seek(ll.offset))
|
if (!file.seek(ll.offset))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user