summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Riemann <[email protected]>2011-07-17 13:57:33 +0200
committerraveit65 <[email protected]>2018-07-14 16:25:43 +0200
commit32f2e6f2e47c8fe4da7ebe9767b0a315ec2b3d45 (patch)
treec80e99c202f6370ab8caaef358930ace4d1a153b
parent017f7e5ff65081068cb504c5d4561ab685a66fa7 (diff)
downloadeom-32f2e6f2e47c8fe4da7ebe9767b0a315ec2b3d45.tar.bz2
eom-32f2e6f2e47c8fe4da7ebe9767b0a315ec2b3d45.tar.xz
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 https://github.com/mate-desktop/eom/issues/125
-rw-r--r--src/eom-exif-details.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/eom-exif-details.c b/src/eom-exif-details.c
index bbc9aca..3281551 100644
--- a/src/eom-exif-details.c
+++ b/src/eom-exif-details.c
@@ -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;
@@ -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];
@@ -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 {
@@ -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)));