Commit 1ee0a9e1 authored by Debarshi Ray's avatar Debarshi Ray Committed by Debarshi Ray

thumbnailer: Don't lose the dimensions of the original image

All the options are stored under the "gdk_pixbuf_options" key, and only
those were being copied after applying the orientation. Anything else
stored under any other key gets lost with the unoriented GdkPixbuf.

Fallout from 06cf4c78

https://bugzilla.gnome.org/show_bug.cgi?id=778517
parent d2098ff6
......@@ -221,17 +221,17 @@ file_to_pixbuf (const char *path,
if (pixbuf == NULL)
return NULL;
original_width = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (pixbuf),
"gnome-original-width"));
original_height = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (pixbuf),
"gnome-original-height"));
tmp_pixbuf = gdk_pixbuf_apply_embedded_orientation (pixbuf);
gdk_pixbuf_copy_options (pixbuf, tmp_pixbuf);
gdk_pixbuf_remove_option (tmp_pixbuf, "orientation");
g_object_unref (pixbuf);
pixbuf = tmp_pixbuf;
original_width = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (pixbuf),
"gnome-original-width"));
original_height = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (pixbuf),
"gnome-original-height"));
if (original_width > 0 && original_height > 0) {
char *tmp;
......
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