[eog] Make sure GPS Exif tags are named and ordered correctly
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Make sure GPS Exif tags are named and ordered correctly
- Date: Sun, 17 Jul 2011 12:48:39 +0000 (UTC)
commit 8574b4ba6e6211b5f1a7e1fade6e02da2b8703fd
Author: Felix Riemann <friemann gnome org>
Date: Sun Jul 17 13:57:33 2011 +0200
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
src/eog-exif-details.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/eog-exif-details.c b/src/eog-exif-details.c
index b1c2516..67b26ac 100644
--- a/src/eog-exif-details.c
+++ b/src/eog-exif-details.c
@@ -285,6 +285,12 @@ 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;
@@ -355,6 +361,7 @@ exif_entry_cb (ExifEntry *entry, gpointer data)
EogExifDetails *view;
EogExifDetailsPrivate *priv;
ExifCategory cat;
+ ExifIfd ifd = exif_entry_get_ifd (entry);
char *path;
char b[1024];
@@ -369,7 +376,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 {
@@ -401,7 +408,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)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]