Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when extracting GPS coordinates from EXIF metadata #200

Open
VctorAHernndez opened this issue Jul 20, 2024 · 1 comment
Open

Bug when extracting GPS coordinates from EXIF metadata #200

VctorAHernndez opened this issue Jul 20, 2024 · 1 comment

Comments

@VctorAHernndez
Copy link

Hi!

I've been using exifread for the last couple months and started reading the source code to understand how it works under the hood. I quickly noticed that there's a validation line in exifread.utils.get_gps_coords(...) that seems to be off:

gps_tags = [lng_ref_tag_name, lng_tag_name, lat_tag_name, lat_tag_name]

I might be mistaken / speaking out of place, but I think the line should be changed to:

gps_tags = [lng_ref_tag_name, lng_tag_name, lat_ref_tag_name, lat_tag_name]

That way, we ensure that even if one of the metadata fields is missing, we return an empty tuple (or maybe raise an exception?).

Huge props to all contributors, by the way! This library is super helpful, and I imagine keeping track of all the little tidbits that went into parsing data from a fairly complex standard is super hard. I appreciate it immensely.

@VctorAHernndez
Copy link
Author

I can get started on the pull request, if need be!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant