The PNG Guide is an eBook based on Greg Roelofs' book, originally published by O'Reilly. |
Home Reading PNG Images Progressively readpng2_end_callback() | |
readpng2_end_callback()static void rpng2_x_finish_display() { rpng2_info.done = TRUE; printf("Done. Press Q, Esc or mouse button 1 to quit.\n"); } It would also have been reasonable to free both the image_data and bg_data buffers at this point, and a memory-constrained application certainly would do so--or, more likely, it would never have allocated full buffers in the first place, instead handling everything on a per-row basis and calculating the background pattern on the fly. Regardless, I chose to free all front-end buffers in the front-end cleanup routine, which is the last function called before the program exits.
|
|
Home Reading PNG Images Progressively readpng2_end_callback() |