[solang] Automatic rotation according to Exif tags
- From: Debarshi Ray <debarshir src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [solang] Automatic rotation according to Exif tags
- Date: Fri, 25 Dec 2009 10:36:16 +0000 (UTC)
commit 4826b65864cab99f02209e08063a724d1bb0f0da
Author: Debarshi Ray <rishi gnu org>
Date: Sun Dec 6 00:52:22 2009 +0200
Automatic rotation according to Exif tags
Used gdk_pixbuf_apply_embedded_orientation to transform the GdkPixbufs
based on the associated "orientation" option.
Fixes: https://savannah.nongnu.org/bugs/?27161
src/attribute/thumbnail.cpp | 2 ++
src/renderer/enlarged-renderer.cpp | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/attribute/thumbnail.cpp b/src/attribute/thumbnail.cpp
index 4a57885..e0f5023 100644
--- a/src/attribute/thumbnail.cpp
+++ b/src/attribute/thumbnail.cpp
@@ -272,6 +272,8 @@ Thumbnail::generate_using_gdkpixbuf(const Glib::ustring & path,
return;
}
+ thumbnail = Glib::wrap(gdk_pixbuf_apply_embedded_orientation(
+ thumbnail->gobj()), false);
thumbnail->save( get_path(), "jpeg" );
set_resolution( Resolution( thumbnail->get_width(),
diff --git a/src/renderer/enlarged-renderer.cpp b/src/renderer/enlarged-renderer.cpp
index 80efa14..01f83e0 100644
--- a/src/renderer/enlarged-renderer.cpp
+++ b/src/renderer/enlarged-renderer.cpp
@@ -153,6 +153,9 @@ EnlargedRenderer::render(const PhotoPtr & photo) throw()
return;
}
+ pixbuf = Glib::wrap(gdk_pixbuf_apply_embedded_orientation(
+ pixbuf->gobj()), false);
+
if (0 == imageView_)
{
imageView_ = gtk_image_view_new();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]