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

Fixed lat/lon reference parsing in big endian EXIF entries

Closes #218
This commit is contained in:
2019-08-11 09:26:54 +02:00
parent b72a9e67fe
commit 680104fec3
2 changed files with 6 additions and 2 deletions

View File

@ -113,9 +113,12 @@ Coordinates EXIFParser::coordinates(TIFFFile &file, const IFDEntry &lon,
if (!c.isValid())
return Coordinates();
if (lonRef.offset == 'W')
char ew = file.isBE() ? lonRef.offset >> 24 : lonRef.offset;
char ns = file.isBE() ? latRef.offset >> 24 : latRef.offset;
if (ew == 'W')
c.rlon() = -c.lon();
if (latRef.offset == 'S')
if (ns == 'S')
c.rlat() = -c.lat();
return c;