summaryrefslogtreecommitdiff
path: root/test/test-eel-pixbuf-scale.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-eel-pixbuf-scale.c')
-rw-r--r--test/test-eel-pixbuf-scale.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test-eel-pixbuf-scale.c b/test/test-eel-pixbuf-scale.c
index 2aa10ecf..ee6d9181 100644
--- a/test/test-eel-pixbuf-scale.c
+++ b/test/test-eel-pixbuf-scale.c
@@ -11,6 +11,8 @@ main (int argc, char* argv[])
GdkPixbuf *pixbuf, *scaled;
GError *error;
gint64 t1, t2;
+ int width;
+ int height;
test_init (&argc, &argv);
@@ -27,9 +29,11 @@ main (int argc, char* argv[])
exit (1);
}
+ width = gdk_pixbuf_get_width (pixbuf);
+ height = gdk_pixbuf_get_height (pixbuf);
printf ("scale factors: %f, %f\n",
- (double)gdk_pixbuf_get_width(pixbuf)/DEST_WIDTH,
- (double)gdk_pixbuf_get_height(pixbuf)/DEST_HEIGHT);
+ ((double) width) / ((double) DEST_WIDTH),
+ ((double) height) / ((double) DEST_HEIGHT));
t1 = g_get_monotonic_time ();
scaled = eel_gdk_pixbuf_scale_down (pixbuf, DEST_WIDTH, DEST_HEIGHT);