summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-12-18 22:15:29 -0500
committerMatthias Clasen <mclasen@redhat.com>2013-12-18 22:19:38 -0500
commit653be4169d8da106fc86b1a86a1259a553f6377a (patch)
treebf491e6c1ddf85cd5c87a5adc16eb5a13977d5ec
parentf1f8fb67a4ae2a3fe2759668f9451fb79fca48f8 (diff)
downloadgdk-pixbuf-653be4169d8da106fc86b1a86a1259a553f6377a.tar.gz
Make scaling of xpms work again
Commit c62676a284 had an unintended side-effect for loaders which omit to call size_func, the new size set by gdk_pixbuf_loader_set_size would overwrite the original pixbuf size, and in effect force a scale factor of 1.0. The xpm loader is one of the few which omit the size_func call, thus the regression that calling gdk_pixbuf_new_from_file_at_scale does not scale xpms anymore. The fix is to use separate variables to pass the dimensions when calling the size_func on behalf of the loader. https://bugzilla.gnome.org/show_bug.cgi?id=686514
-rw-r--r--gdk-pixbuf/gdk-pixbuf-loader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index 96920e071..5cf3f7414 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -325,8 +325,10 @@ gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf,
if (!priv->size_fixed)
{
+ gint w = width;
+ gint h = height;
/* Defend against lazy loaders which don't call size_func */
- gdk_pixbuf_loader_size_func (&width, &height, loader);
+ gdk_pixbuf_loader_size_func (&w, &h, loader);
}
priv->needs_scale = FALSE;