Changeset 846 for trunk/src/3rdparty/libpng/example.c
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/3rdparty/libpng/example.c
r561 r846 3 3 4 4 /* example.c - an example of using libpng 5 * Last changed in libpng 1. 2.37 [June 4, 2009]5 * Last changed in libpng 1.4.0 [January 3, 2010] 6 6 * This file has been placed in the public domain by the authors. 7 * Maintained 1998-20 09Glenn Randers-Pehrson7 * Maintained 1998-2010 Glenn Randers-Pehrson 8 8 * Maintained 1996, 1997 Andreas Dilger) 9 9 * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) … … 122 122 { 123 123 fclose(fp); 124 png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);124 png_destroy_read_struct(&png_ptr, NULL, NULL); 125 125 return (ERROR); 126 126 } … … 134 134 { 135 135 /* Free all of the memory associated with the png_ptr and info_ptr */ 136 png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);136 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); 137 137 fclose(fp); 138 138 /* If we get here, we had a problem reading the file */ … … 165 165 * pixels) into the info structure with this call: 166 166 */ 167 png_read_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);167 png_read_png(png_ptr, info_ptr, png_transforms, NULL); 168 168 169 169 #else … … 176 176 177 177 png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 178 &interlace_type, int_p_NULL, int_p_NULL);178 &interlace_type, NULL, NULL); 179 179 180 180 /* Set up the data transformations you want. Note that these are all … … 287 287 288 288 png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS, 289 MAX_SCREEN_COLORS, png_uint_16p_NULL, 0);289 MAX_SCREEN_COLORS, NULL, 0); 290 290 } 291 291 /* This reduces the image to the palette supplied in the file */ … … 366 366 for (y = 0; y < height; y++) 367 367 { 368 png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, 1);368 png_read_rows(png_ptr, &row_pointers[y], NULL, 1); 369 369 } 370 370 … … 373 373 { 374 374 #ifdef sparkle /* Read the image using the "sparkle" effect. */ 375 png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL,375 png_read_rows(png_ptr, &row_pointers[y], NULL, 376 376 number_of_rows); 377 377 #else no_sparkle /* Read the image using the "rectangle" effect */ 378 png_read_rows(png_ptr, png_bytepp_NULL, &row_pointers[y],378 png_read_rows(png_ptr, NULL, &row_pointers[y], 379 379 number_of_rows); 380 380 #endif no_sparkle /* Use only one of these two methods */ … … 393 393 394 394 /* Clean up after the read, and free any memory allocated - REQUIRED */ 395 png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);395 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); 396 396 397 397 /* Close the file */ … … 426 426 if (*info_ptr == NULL) 427 427 { 428 png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);428 png_destroy_read_struct(png_ptr, info_ptr, NULL); 429 429 return (ERROR); 430 430 } … … 432 432 if (setjmp(png_jmpbuf((*png_ptr)))) 433 433 { 434 png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);434 png_destroy_read_struct(png_ptr, info_ptr, NULL); 435 435 return (ERROR); 436 436 } … … 461 461 { 462 462 /* Free the png_ptr and info_ptr memory on error */ 463 png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);463 png_destroy_read_struct(png_ptr, info_ptr, NULL); 464 464 return (ERROR); 465 465 } … … 594 594 { 595 595 fclose(fp); 596 png_destroy_write_struct(&png_ptr, png_infopp_NULL);596 png_destroy_write_struct(&png_ptr, NULL); 597 597 return (ERROR); 598 598 } … … 629 629 * PNG_TRANSFORM flags into the png_transforms integer here. 630 630 */ 631 png_write_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);631 png_write_png(png_ptr, info_ptr, png_transforms, NULL); 632 632 633 633 #else
Note:
See TracChangeset
for help on using the changeset viewer.