drewnoakes / metadata-extractor-dotnet

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Other
934 stars 165 forks source link

Bug in GpsDescriptor.GetGpsDestLongitudeDescription #312

Closed reinfallt closed 2 years ago

reinfallt commented 2 years ago

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

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

drewnoakes commented 2 years ago

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