Skip to content

ExifProfile.GetValue retrieves incorrect value for GPSLatitudeRef due to Tag ID collision with InteroperabilityIndex (0x0001) #2017

Description

@vvyoko

Magick.NET version

14.13.0

Environment (Operating system, version and so on)

windows 10

Description

When an image contains both GPS metadata and Interoperability metadata, calling profile.GetValue(ExifTag.GPSLatitudeRef) returns the value of InteroperabilityIndex (e.g., "R98") instead of the actual GPS reference (e.g., "N" or "S").

Steps to Reproduce

run exiftool -G1 -a -s image.jpeg

[InteropIFD]    InteropIndex                    : R98 - DCF basic file (sRGB)
[InteropIFD]    InteropVersion                  : 0100
[GPS]           GPSLatitudeRef                  : North
[GPS]           GPSLatitude                     : 34 deg 45' 3.95"
[GPS]           GPSLongitudeRef                 : East
[GPS]           GPSLongitude                    : 113 deg 39' 38.55"
var profile = image.GetExifProfile();
var latitudeRef = profile.GetValue(ExifTag.GPSLatitudeRef); 
// Actual: "R98"
// Expected: "N"

Images

558661696-404b3951-6928-49c8-b6a5-acb35e84cfe7.jpg

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions