[gthumb: 14/20] [exiv_tools] fixed the exif orientation tag name
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 14/20] [exiv_tools] fixed the exif orientation tag name
- Date: Tue, 30 Mar 2010 19:33:18 +0000 (UTC)
commit 09ae81a1b41d771c7e59664307f8f2979731629e
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]