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);