png_set_keep_unknown_chunks

Name

png_set_keep_unknown_chunks -- specify list of chunks and how to handle them

Synopsis

#include <png.h>

void png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep chunk_list, int num_chunks);

Description

This interface shall specify a list of chunks and how to handle them. Any unspecified chunks shall be handled in the default way. The IEND and IHDR chunks must not be specified.

The parameter png_ptr shall specify the PNG file.

The parameter keep shall specify how the unknown chunks are to be handled (see below).

The parameter chunk_list shall specify the PNG info structure.

The parameter num_chunks shall specify the number of unknown chunks.

The possible values of keep are as follows.

0 

handle unknown chunks in the default way

1 

do not keep unknown chunks

2 

keep unknown chunks only if they are safe to copy

3 

keep unknown chunks even if they are unsafe to copy