2 ===================================================================
3 --- png.cc (Revision 1675)
4 +++ png.cc (Arbeitskopie)
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);
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 */
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);
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);
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);
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);