updated on Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git] / exactimage-svn / exactimage-svn_png_patch.diff
blobba194eeddb152c0b204f65e58ad389492ab8de16
1 Index: png.cc
2 ===================================================================
3 --- png.cc (Revision 1675)
4 +++ png.cc (Arbeitskopie)
5 @@ -71,7 +71,7 @@
6 /* Allocate/initialize the memory for image information. REQUIRED. */
7 info_ptr = png_create_info_struct(png_ptr);
8 if (info_ptr == NULL) {
9 - png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
10 + png_destroy_read_struct(&png_ptr, NULL, NULL);
11 return 0;
14 @@ -82,7 +82,7 @@
16 if (setjmp(png_jmpbuf(png_ptr))) {
17 /* Free all of the memory associated with the png_ptr and info_ptr */
18 - png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
19 + png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
20 /* If we get here, we had a problem reading the file */
21 return 0;
23 @@ -99,7 +99,7 @@
24 png_read_info (png_ptr, info_ptr);
26 png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
27 - &interlace_type, int_p_NULL, int_p_NULL);
28 + &interlace_type, NULL, NULL);
30 image.w = width;
31 image.h = height;
32 @@ -196,11 +196,11 @@
33 for (int pass = 0; pass < number_passes; ++pass)
34 for (unsigned int y = 0; y < height; ++y) {
35 row_pointers[0] = image.getRawData() + y * stride;
36 - png_read_rows(png_ptr, row_pointers, png_bytepp_NULL, 1);
37 + png_read_rows(png_ptr, row_pointers, NULL, 1);
40 /* clean up after the read, and free any memory allocated - REQUIRED */
41 - png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
42 + png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
44 /* that's it */
45 return true;
46 @@ -224,7 +224,7 @@
47 /* Allocate/initialize the memory for image information. REQUIRED. */
48 info_ptr = png_create_info_struct(png_ptr);
49 if (info_ptr == NULL) {
50 - png_destroy_write_struct(&png_ptr, png_infopp_NULL);
51 + png_destroy_write_struct(&png_ptr, NULL);
52 return false;
55 @@ -244,8 +244,8 @@
56 else if (quality > Z_BEST_COMPRESSION) quality = Z_BEST_COMPRESSION;
57 png_set_compression_level(png_ptr, quality);
59 - png_info_init (info_ptr);
61 + info_ptr = png_create_info_struct(png_ptr);
63 /* Set up our STL stream output control */
64 png_set_write_fn (png_ptr, stream, &stdstream_write_data, &stdstream_flush_data);