summaryrefslogtreecommitdiff
path: root/thumbnailer
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@freedesktop.org>2018-04-26 13:57:15 +0200
committerDebarshi Ray <debarshir@gnome.org>2018-05-01 17:02:10 +0200
commit1ee0a9e1f3cbf9d7bfaf98312a2dfd0685ee4332 (patch)
tree2d640f5b76ad7fc5a3a6a3aed9a3b08abc208ae9 /thumbnailer
parentd2098ff6f68c6c0235e0d43ce11f718988685780 (diff)
downloadgdk-pixbuf-1ee0a9e1f3cbf9d7bfaf98312a2dfd0685ee4332.tar.gz
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 06cf4c78067203b78acbfb29862350cdb8200b73 https://bugzilla.gnome.org/show_bug.cgi?id=778517
Diffstat (limited to 'thumbnailer')
-rw-r--r--thumbnailer/gdk-pixbuf-thumbnailer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/thumbnailer/gdk-pixbuf-thumbnailer.c b/thumbnailer/gdk-pixbuf-thumbnailer.c
index 2fe728d40..85df4b3a8 100644
--- a/thumbnailer/gdk-pixbuf-thumbnailer.c
+++ b/thumbnailer/gdk-pixbuf-thumbnailer.c
@@ -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;