mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 18:40:40 -05:00
compositor: Handle EXIF orientation for backgrounds
Apply the embedded EXIF orientation when the background is loaded. https://bugzilla.gnome.org/show_bug.cgi?id=783125
This commit is contained in:
parent
5fc6200375
commit
19f4342b46
@ -155,7 +155,7 @@ file_loaded (GObject *source_object,
|
||||
CoglError *catch_error = NULL;
|
||||
GTask *task;
|
||||
CoglTexture *texture;
|
||||
GdkPixbuf *pixbuf;
|
||||
GdkPixbuf *pixbuf, *rotated;
|
||||
int width, height, row_stride;
|
||||
guchar *pixels;
|
||||
gboolean has_alpha;
|
||||
@ -173,6 +173,13 @@ file_loaded (GObject *source_object,
|
||||
goto out;
|
||||
}
|
||||
|
||||
rotated = gdk_pixbuf_apply_embedded_orientation (pixbuf);
|
||||
if (rotated != NULL)
|
||||
{
|
||||
g_object_unref (pixbuf);
|
||||
pixbuf = rotated;
|
||||
}
|
||||
|
||||
width = gdk_pixbuf_get_width (pixbuf);
|
||||
height = gdk_pixbuf_get_height (pixbuf);
|
||||
row_stride = gdk_pixbuf_get_rowstride (pixbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user