From 58420806bbbe3970747edc2efaa155651377a370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 17 Mar 2005 13:13:56 +0000 Subject: [PATCH] From Tor Lillqvist : Open output PNG files in binary mode. --- ChangeLog | 7 +++++++ test/cairo-test.c | 4 ++-- test/cairo_test.c | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30da73976..c307a0977 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-03-17 Kristian Høgsberg + + From Tor Lillqvist : + + * test/cairo_test.c (cairo_test): Open output PNG files in binary + mode. + 2005-03-17 Owen Taylor * src/cairo.h src/cairo_surface.c src/cairo-xlib.h diff --git a/test/cairo-test.c b/test/cairo-test.c index 7e468b0bf..5cee2058d 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -159,7 +159,7 @@ cairo_test (cairo_test_t *test, cairo_test_draw_function_t draw) return CAIRO_TEST_SUCCESS; } - png_file = fopen (png_name, "w"); + png_file = fopen (png_name, "wb"); write_png_argb32 (png_buf, png_file, test->width, test->height, stride); fclose (png_file); @@ -205,7 +205,7 @@ cairo_test (cairo_test_t *test, cairo_test_draw_function_t draw) log_file = fopen (log_name, "a"); fprintf (log_file, "Error: %d pixels differ from reference image %s\n", pixels_changed, ref_name); - png_file = fopen (diff_name, "w"); + png_file = fopen (diff_name, "wb"); write_png_argb32 (diff_buf, png_file, test->width, test->height, stride); fclose (png_file); fclose (log_file); diff --git a/test/cairo_test.c b/test/cairo_test.c index 7e468b0bf..5cee2058d 100644 --- a/test/cairo_test.c +++ b/test/cairo_test.c @@ -159,7 +159,7 @@ cairo_test (cairo_test_t *test, cairo_test_draw_function_t draw) return CAIRO_TEST_SUCCESS; } - png_file = fopen (png_name, "w"); + png_file = fopen (png_name, "wb"); write_png_argb32 (png_buf, png_file, test->width, test->height, stride); fclose (png_file); @@ -205,7 +205,7 @@ cairo_test (cairo_test_t *test, cairo_test_draw_function_t draw) log_file = fopen (log_name, "a"); fprintf (log_file, "Error: %d pixels differ from reference image %s\n", pixels_changed, ref_name); - png_file = fopen (diff_name, "w"); + png_file = fopen (diff_name, "wb"); write_png_argb32 (diff_buf, png_file, test->width, test->height, stride); fclose (png_file); fclose (log_file);