diff options
Diffstat (limited to 'libgnome-desktop/gnome-bg/gnome-bg.c')
-rw-r--r-- | libgnome-desktop/gnome-bg/gnome-bg.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libgnome-desktop/gnome-bg/gnome-bg.c b/libgnome-desktop/gnome-bg/gnome-bg.c index 22b573dd..a95d4379 100644 --- a/libgnome-desktop/gnome-bg/gnome-bg.c +++ b/libgnome-desktop/gnome-bg/gnome-bg.c @@ -2260,6 +2260,7 @@ create_thumbnail_for_filename (GnomeDesktopThumbnailFactory *factory, if (orig) { int orig_width, orig_height; GdkPixbuf *rotated; + gchar *orig_height_str, *orig_width_str; rotated = gdk_pixbuf_apply_embedded_orientation (orig); if (rotated != NULL) { @@ -2269,13 +2270,19 @@ create_thumbnail_for_filename (GnomeDesktopThumbnailFactory *factory, orig_width = gdk_pixbuf_get_width (orig); orig_height = gdk_pixbuf_get_height (orig); - + result = pixbuf_scale_to_fit (orig, THUMBNAIL_SIZE, THUMBNAIL_SIZE); - - g_object_set_data_full (G_OBJECT (result), "gnome-thumbnail-height", - g_strdup_printf ("%d", orig_height), g_free); - g_object_set_data_full (G_OBJECT (result), "gnome-thumbnail-width", - g_strdup_printf ("%d", orig_width), g_free); + + orig_height_str = g_strdup_printf ("%d", orig_height); + orig_width_str = g_strdup_printf ("%d", orig_width); + + gdk_pixbuf_set_option (result, "tEXt::Thumb::Image::Height", orig_height_str); + gdk_pixbuf_set_option (result, "tEXt::Thumb::Image::Width", orig_width_str); + + g_object_set_data_full (G_OBJECT (result), "gnome-thumbnail-height", + g_steal_pointer (&orig_height_str), g_free); + g_object_set_data_full (G_OBJECT (result), "gnome-thumbnail-width", + g_steal_pointer (&orig_width_str), g_free); g_object_unref (orig); |