Skip to content

Commit

Permalink
Make sure GPS Exif tags are named and ordered correctly
Browse files Browse the repository at this point in the history
Some GPS tag IDs overlap with IDs from other IFDs.
Specifically check for the GPS IFD and order the entries accordingly.
Also respect the IFD when determining the tag's title.

https://bugzilla.gnome.org/show_bug.cgi?id=627185

origin commit:
https://gitlab.gnome.org/GNOME/eog/commit/8574b4b

Fixes #125
  • Loading branch information
fxri authored and raveit65 committed Jul 14, 2018
1 parent 017f7e5 commit 32f2e6f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/eom-exif-details.c
Expand Up @@ -283,6 +283,11 @@ get_exif_category (ExifEntry *entry)
ExifCategory cat = EXIF_CATEGORY_OTHER;
int i;

/* Some GPS tag IDs overlap with other ones, so check the IFD */
if (exif_entry_get_ifd (entry) == EXIF_IFD_GPS) {
return EXIF_CATEGORY_OTHER;
}

for (i = 0; exif_tag_category_map [i].id != -1; i++) {
if (exif_tag_category_map[i].id == (int) entry->tag) {
cat = exif_tag_category_map[i].category;
Expand Down Expand Up @@ -353,6 +358,7 @@ exif_entry_cb (ExifEntry *entry, gpointer data)
EomExifDetails *view;
EomExifDetailsPrivate *priv;
ExifCategory cat;
ExifIfd ifd = exif_entry_get_ifd (entry);
char *path;
char b[1024];

Expand All @@ -367,7 +373,7 @@ exif_entry_cb (ExifEntry *entry, gpointer data)
set_row_data (store,
path,
NULL,
exif_tag_get_name (entry->tag),
exif_tag_get_name_in_ifd (entry->tag, ifd),
exif_entry_get_value (entry, b, sizeof(b)));
} else {

Expand Down Expand Up @@ -399,7 +405,7 @@ exif_entry_cb (ExifEntry *entry, gpointer data)
path = set_row_data (store,
NULL,
exif_categories[cat].path,
exif_tag_get_name (entry->tag),
exif_tag_get_name_in_ifd (entry->tag, ifd),
exif_entry_get_value (entry, b,
sizeof(b)));

Expand Down

0 comments on commit 32f2e6f

Please sign in to comment.