mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 14:58:06 +02:00
From Tor Lillqvist <tml@novell.com>:
Open output PNG files in binary mode.
This commit is contained in:
parent
e66e4c7b8c
commit
58420806bb
3 changed files with 11 additions and 4 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2005-03-17 Kristian Høgsberg <krh@redhat.com>
|
||||
|
||||
From Tor Lillqvist <tml@novell.com>:
|
||||
|
||||
* test/cairo_test.c (cairo_test): Open output PNG files in binary
|
||||
mode.
|
||||
|
||||
2005-03-17 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* src/cairo.h src/cairo_surface.c src/cairo-xlib.h
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue