summaryrefslogtreecommitdiff
path: root/test/test-eel-pixbuf-scale.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-06-16 13:37:09 +0200
committerraveit65 <[email protected]>2019-06-18 14:46:34 +0200
commite0e185b1790f5a670cdd1292bac75ad1c44e4996 (patch)
treeb5d170259858c497dbfb813c0ddb55a197a2c5ca /test/test-eel-pixbuf-scale.c
parentef29013fdfd0df5d4a3cc6c5a8fb1583aabef952 (diff)
downloadcaja-e0e185b1790f5a670cdd1292bac75ad1c44e4996.tar.bz2
caja-e0e185b1790f5a670cdd1292bac75ad1c44e4996.tar.xz
Remove trailing whitespaces
find . -regextype posix-extended -regex '.*\.(c|h|ac|txt|xml)' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
Diffstat (limited to 'test/test-eel-pixbuf-scale.c')
-rw-r--r--test/test-eel-pixbuf-scale.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/test-eel-pixbuf-scale.c b/test/test-eel-pixbuf-scale.c
index c2abe307..481c4aa6 100644
--- a/test/test-eel-pixbuf-scale.c
+++ b/test/test-eel-pixbuf-scale.c
@@ -9,14 +9,14 @@
#define DEST_WIDTH 32
#define DEST_HEIGHT 32
-int
+int
main (int argc, char* argv[])
{
GdkPixbuf *pixbuf, *scaled;
GError *error;
struct timeval t1, t2;
int i;
-
+
test_init (&argc, &argv);
if (argc != 2) {
@@ -31,11 +31,11 @@ main (int argc, char* argv[])
printf ("error loading pixbuf: %s\n", error->message);
exit (1);
}
-
+
printf ("scale factors: %f, %f\n",
(double)gdk_pixbuf_get_width(pixbuf)/DEST_WIDTH,
(double)gdk_pixbuf_get_height(pixbuf)/DEST_HEIGHT);
-
+
gettimeofday(&t1, NULL);
for (i = 0; i < N_SCALES; i++) {
scaled = eel_gdk_pixbuf_scale_down (pixbuf, DEST_WIDTH, DEST_HEIGHT);
@@ -44,9 +44,9 @@ main (int argc, char* argv[])
gettimeofday(&t2, NULL);
g_print ("Time for eel_gdk_pixbuf_scale_down: %ld msecs\n",
(t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000);
-
-
-
+
+
+
gettimeofday(&t1, NULL);
for (i = 0; i < N_SCALES; i++) {
scaled = gdk_pixbuf_scale_simple (pixbuf, DEST_WIDTH, DEST_HEIGHT, GDK_INTERP_NEAREST);
@@ -56,7 +56,7 @@ main (int argc, char* argv[])
g_print ("Time for INTERP_NEAREST: %ld msecs\n",
(t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000);
-
+
gettimeofday(&t1, NULL);
for (i = 0; i < N_SCALES; i++) {
scaled = gdk_pixbuf_scale_simple (pixbuf, DEST_WIDTH, DEST_HEIGHT, GDK_INTERP_BILINEAR);
@@ -65,17 +65,17 @@ main (int argc, char* argv[])
gettimeofday(&t2, NULL);
g_print ("Time for INTERP_BILINEAR: %ld msecs\n",
(t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000);
-
+
scaled = eel_gdk_pixbuf_scale_down (pixbuf, DEST_WIDTH, DEST_HEIGHT);
- gdk_pixbuf_save (scaled, "eel_scaled.png", "png", NULL, NULL);
+ gdk_pixbuf_save (scaled, "eel_scaled.png", "png", NULL, NULL);
g_object_unref (scaled);
scaled = gdk_pixbuf_scale_simple (pixbuf, DEST_WIDTH, DEST_HEIGHT, GDK_INTERP_NEAREST);
- gdk_pixbuf_save (scaled, "nearest_scaled.png", "png", NULL, NULL);
+ gdk_pixbuf_save (scaled, "nearest_scaled.png", "png", NULL, NULL);
g_object_unref (scaled);
scaled = gdk_pixbuf_scale_simple (pixbuf, DEST_WIDTH, DEST_HEIGHT, GDK_INTERP_BILINEAR);
- gdk_pixbuf_save (scaled, "bilinear_scaled.png", "png", NULL, NULL);
+ gdk_pixbuf_save (scaled, "bilinear_scaled.png", "png", NULL, NULL);
g_object_unref (scaled);
return 0;