[gthumb] [exiv_tools] fixed the exif orientation tag name



commit f0548ccc277f944cfdf605b9c5273746092d1842
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Mar 29 19:27:40 2010 +0200

    [exiv_tools] fixed the exif orientation tag name
    
    Specify the orignetation tag in the exiv2 format.  Removed use of
    the xmp orientation tag.

 extensions/exiv2_tools/exiv2-utils.cpp |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/extensions/exiv2_tools/exiv2-utils.cpp b/extensions/exiv2_tools/exiv2-utils.cpp
index feb02f5..faedcbb 100644
--- a/extensions/exiv2_tools/exiv2-utils.cpp
+++ b/extensions/exiv2_tools/exiv2-utils.cpp
@@ -870,6 +870,7 @@ exiv2_generate_thumbnail (const char *uri,
 						double image_ratio = (((double) image_width) / image_height);
 						double thumbnail_ratio = (((double) gdk_pixbuf_get_width (pixbuf)) / gdk_pixbuf_get_height (pixbuf));
 						double ratio_delta = (image_ratio > thumbnail_ratio) ? (image_ratio - thumbnail_ratio) : (thumbnail_ratio - image_ratio);
+
 						if (ratio_delta > MAX_RATIO_ERROR_TOLERANCE) {
 							g_object_unref (pixbuf);
 							pixbuf = NULL;
@@ -890,13 +891,9 @@ exiv2_generate_thumbnail (const char *uri,
 							/* Set the orientation option to correctly rotate the thumbnail
 							 * in gnome_desktop_thumbnail_factory_generate_thumbnail() */
 
-							for (int i = 0; _ORIENTATION_TAG_NAMES[i] != NULL; i++) {
-								const char *orientation = ed[_ORIENTATION_TAG_NAMES[i]].toString().c_str();
-								if (orientation != NULL) {
-									gdk_pixbuf_set_option (pixbuf, "orientation", orientation);
-									break;
-								}
-							}
+							const char *orientation = ed["Exif.Image.Orientation"].toString().c_str();
+							if (orientation != NULL)
+								gdk_pixbuf_set_option (pixbuf, "orientation", orientation);
 						}
 					}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]