Skip to content

Commit af9cd83

Browse files
fxriraveit65
authored andcommitted
Make sure GPS Exif tags are named and ordered correctly
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
1 parent 7e9dc52 commit af9cd83

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/eom-exif-details.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ get_exif_category (ExifEntry *entry)
283283
ExifCategory cat = EXIF_CATEGORY_OTHER;
284284
int i;
285285

286+
/* Some GPS tag IDs overlap with other ones, so check the IFD */
287+
if (exif_entry_get_ifd (entry) == EXIF_IFD_GPS) {
288+
return EXIF_CATEGORY_OTHER;
289+
}
290+
286291
for (i = 0; exif_tag_category_map [i].id != -1; i++) {
287292
if (exif_tag_category_map[i].id == (int) entry->tag) {
288293
cat = exif_tag_category_map[i].category;
@@ -353,6 +358,7 @@ exif_entry_cb (ExifEntry *entry, gpointer data)
353358
EomExifDetails *view;
354359
EomExifDetailsPrivate *priv;
355360
ExifCategory cat;
361+
ExifIfd ifd = exif_entry_get_ifd (entry);
356362
char *path;
357363
char b[1024];
358364

@@ -367,7 +373,7 @@ exif_entry_cb (ExifEntry *entry, gpointer data)
367373
set_row_data (store,
368374
path,
369375
NULL,
370-
exif_tag_get_name (entry->tag),
376+
exif_tag_get_name_in_ifd (entry->tag, ifd),
371377
exif_entry_get_value (entry, b, sizeof(b)));
372378
} else {
373379

@@ -399,7 +405,7 @@ exif_entry_cb (ExifEntry *entry, gpointer data)
399405
path = set_row_data (store,
400406
NULL,
401407
exif_categories[cat].path,
402-
exif_tag_get_name (entry->tag),
408+
exif_tag_get_name_in_ifd (entry->tag, ifd),
403409
exif_entry_get_value (entry, b,
404410
sizeof(b)));
405411

0 commit comments

Comments
 (0)