| The PNG Guide is an eBook based on Greg Roelofs' book, originally published by O'Reilly. |
|

Home Reading PNG Images readpng_cleanup() |
|
|
|
|
readpng_cleanup()
That is, the main program calls readpng_cleanup() with a zero (FALSE) argument here so that image_data is not freed. If it had waited to clean up until after the user requested the program to end, it would have passed a nonzero (TRUE) argument instead. Setting png_ptr and info_ptr to NULL is unnecessary here, since png_destroy_read_struct() does that for us; but we do it anyway, since it's a habit that tends to save on debugging time in the long run.
|
|
Home Reading PNG Images readpng_cleanup() |
|