Commit 71dd9d76 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

apply embedded orientation to pixbufs where appropriate

parent 580b2041
......@@ -839,9 +839,17 @@ picasa_web_thumbnail_loader (GthFileData *file_data,
stream = g_memory_input_stream_new_from_data (buffer, size, g_free);
pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, error);
if (pixbuf != NULL)
if (pixbuf != NULL) {
GdkPixbuf *rotated;
rotated = gdk_pixbuf_apply_embedded_orientation (pixbuf);
g_object_unref (pixbuf);
pixbuf = rotated;
animation = gdk_pixbuf_non_anim_new (pixbuf);
}
g_object_unref (pixbuf);
g_object_unref (stream);
}
......
......@@ -334,6 +334,7 @@ file_buffer_ready_cb (void **buffer,
{
GthPixbufListTask *self = user_data;
GInputStream *istream;
GdkPixbuf *pixbuf;
if (error != NULL) {
gth_task_completed (GTH_TASK (self), error);
......@@ -341,7 +342,14 @@ file_buffer_ready_cb (void **buffer,
}
istream = g_memory_input_stream_new_from_data (*buffer, count, NULL);
self->priv->original_pixbuf = gdk_pixbuf_new_from_stream (istream, gth_task_get_cancellable (GTH_TASK (self)), &error);
pixbuf = gdk_pixbuf_new_from_stream (istream, gth_task_get_cancellable (GTH_TASK (self)), &error);
if (pixbuf != NULL) {
self->priv->original_pixbuf = gdk_pixbuf_apply_embedded_orientation (pixbuf);
g_object_unref (pixbuf);
}
else
self->priv->original_pixbuf = NULL;
g_object_unref (istream);
if (self->priv->original_pixbuf == NULL) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment