[balsa/gtk3] Rotate image when necessary



commit d8adde8fab6ecce7dfb5c3e068122cd666bde233
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu Apr 19 19:32:18 2012 -0400

    Rotate image when necessary
    
    	* libbalsa/body.c (libbalsa_message_body_get_pixbuf): apply
    	embedded orientation to pixbuf.

 ChangeLog       |    5 +++++
 libbalsa/body.c |    6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 947ec80..74b5339 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-19  Peter Bloomfield
+
+	* libbalsa/body.c (libbalsa_message_body_get_pixbuf): apply
+	embedded orientation to pixbuf.
+
 2012-04-16  Peter Bloomfield
 
 	* src/balsa-mblist.c (balsa_mblist_mru_add): add folder to the
diff --git a/libbalsa/body.c b/libbalsa/body.c
index 22f1b04..7aaf750 100644
--- a/libbalsa/body.c
+++ b/libbalsa/body.c
@@ -664,8 +664,10 @@ libbalsa_message_body_get_pixbuf(LibBalsaMessageBody * body, GError ** err)
             if (!gdk_pixbuf_loader_write(loader, (guchar *) buf, count, err))
                 break;
 
-        if (!*err && gdk_pixbuf_loader_close(loader, err))
-            pixbuf = g_object_ref(gdk_pixbuf_loader_get_pixbuf(loader));
+        if (!*err && gdk_pixbuf_loader_close(loader, err)) {
+            pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
+            pixbuf = gdk_pixbuf_apply_embedded_orientation(pixbuf);
+        }
 
         g_object_unref(loader);
     }



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