drewnoakes / metadata-extractor-dotnet

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug in GpsDescriptor.GetGpsDestLongitudeDescription

reinfallt opened this issue · comments

longitudeRef.Equals("S", StringComparison.OrdinalIgnoreCase)
Longitude ref is either "E" or "W". Not "N"/"S".

The code should be
longitudeRef.Equals("W", StringComparison.OrdinalIgnoreCase)

Thank you for finding and reporting this.

Interestingly, we don't have a single image in the test data corpus that reproduces this issue. Are you able to share one?

The Java implementation doesn't have this bug. It also has factored out the common code, which I'll do on the .NET side too.

https://github.com/drewnoakes/metadata-extractor/blob/5773aa0e2877d5bafb091c6cbccb550ad2a58479/Source/com/drew/metadata/exif/GpsDescriptor.java#L138-L163