summaryrefslogtreecommitdiff
path: root/libmate-desktop
diff options
context:
space:
mode:
authorClement Lefebvre <[email protected]>2016-05-18 13:36:01 +0100
committerClement Lefebvre <[email protected]>2016-05-18 13:36:01 +0100
commitd7d952787e58ea7ca0b44cda1ad08542ca282721 (patch)
treeea61099dd98a6dbd2fd595f09157d187595394f9 /libmate-desktop
parent2e2176f062b84da4652eb24d21979d51b4bdb061 (diff)
downloadmate-desktop-d7d952787e58ea7ca0b44cda1ad08542ca282721.tar.bz2
mate-desktop-d7d952787e58ea7ca0b44cda1ad08542ca282721.tar.xz
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
Diffstat (limited to 'libmate-desktop')
-rw-r--r--libmate-desktop/mate-bg.c7
1 files changed, 6 insertions, 1 deletions
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;
}