png_free_data

Name

png_free_data -- free internally allocated data

Synopsis

#include <png.h>

void png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num);

Description

This interface shall free data that was internally allocated by libpng.

The parameter png_ptr shall specify the PNG file.

The parameter info_ptr shall specify the PNG info structure containing members to free that are pointing to memory allocated by libpng.

The parameter mask shall specify the data to free with a mask consisting of the logical OR of at least one of the following constants: PNG_FREE_HIST, PNG_FREE_ICCP, PNG_FREE_PCAL, PNG_FREE_PLTE, PNG_FREE_ROWS, PNG_FREE_SCAL, PNG_FREE_SPLT, PNG_FREE_TEXT, PNG_FREE_TRNS, PNG_FREE_UNKN. (To specify all constants, use PNG_FREE_ALL.)

The parameter num shall specify the sequence number of the item to free. The value -1 specifies all items.