png_get_unknown_chunks

Name

png_get_unknown_chunks -- retrieve the unknown chunks from a PNG file

Synopsis

#include <png.h>

png_uint_32 png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr, png_unknown_chunkpp unknowns);

Description

This interface shall retrieve the unknown chunks from a PNG file.

The parameter png_ptr shall specify the PNG file.

The parameter info_ptr shall specify the PNG info structure.

The parameter unknowns shall specify an array of png_unknown_chunk structures containing the unknown chunks. The position of a structure in the array shall correspond to the order in which png_set_unknown_chunks() inserted its chunk into the PNG file, or in which it was read.

The png_unknown_chunkpp structure shall contain the following members.

name 

the name of the chunk

data 

the data of the chunk

size 

the size of the chunk's data

location 

the position of the chunk in the PNG file

Return Value

On success, this interface shall return the number of unknown chunks obtained.

On failure, this interface shall return 0.