From d7d952787e58ea7ca0b44cda1ad08542ca282721 Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Wed, 18 May 2016 13:36:01 +0100 Subject: Backgrounds: Take EXIF rotation tags into consideration When loading a picture to render it as desktop background, consider the presence of a rotation tag to display the picture properly. Ported from https://github.com/linuxmint/cinnamon-desktop/commit/0a5f072befd97b6282a8cff71f0e184becf538b8 --- libmate-desktop/mate-bg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c index 4c45821..cfe14c6 100644 --- a/libmate-desktop/mate-bg.c +++ b/libmate-desktop/mate-bg.c @@ -1961,6 +1961,7 @@ get_as_pixbuf_for_size (MateBG *bg, GdkPixbufFormat *format; GdkPixbuf *pixbuf = NULL; gchar *tmp = NULL; + GdkPixbuf *tmp_pixbuf; /* Try to hit local cache first if relevant */ if (monitor != -1) @@ -1990,8 +1991,12 @@ get_as_pixbuf_for_size (MateBG *bg, g_free (tmp); } - if (pixbuf) + if (pixbuf) { + tmp_pixbuf = gdk_pixbuf_apply_embedded_orientation (pixbuf); + g_object_unref (pixbuf); + pixbuf = tmp_pixbuf; file_cache_add_pixbuf (bg, filename, pixbuf); + } return pixbuf; } -- cgit v1.2.1