[gdk-pixbuf] thumbnailer: Don't lose the dimensions of the original image
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] thumbnailer: Don't lose the dimensions of the original image
- Date: Tue, 1 May 2018 15:02:39 +0000 (UTC)
commit 1ee0a9e1f3cbf9d7bfaf98312a2dfd0685ee4332
Author: Debarshi Ray <debarshir freedesktop org>
Date: Thu Apr 26 13:57:15 2018 +0200
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
thumbnailer/gdk-pixbuf-thumbnailer.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/thumbnailer/gdk-pixbuf-thumbnailer.c b/thumbnailer/gdk-pixbuf-thumbnailer.c
index 2fe728d..85df4b3 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]