The PNG specification defines 18 chunk types. This document is intended to help users who are interested in a particular PNG chunk type. If you have a particular PNG chunk type in mind, you can look here to see what support PyPNG provides for it.
Generated automatically by PyPNG. The IHDR chunk specifies image size, colour model, bit depth, and interlacing. All possible (valid) combinations can be produced with suitable arguments to the png.Writer() class.
Correctly handled when a PNG image is read. Can be generated for a colour type 3 image by using the palette argument to the png.Writer() class. PNG images with colour types other than 3 can also have a PLTE chunk (a suggested palette); it is not currently possible to add a PLTE chunk for these images using PyPNG.
Generated automatically from the pixel data presented to PyPNG. Multiple IDAT chunks (of bounded size) can be generated by using chunk_limit argument to the png.Writer() class.
Generated automatically.
Generated for most colour types when the transparent argument is supplied to the png.Writer() to specify a transparent colour. For colour type 3, colour mapped images, a tRNS chunk will be generated automatically from the palette argument when a palette with alpha (opacity) values is supplied.
Ignored when reading. Not generated.
When reading a PNG image the gAMA chunk is converted to a floating point gamma value; this value is returned in the info dictionary: info['gamma']. When writing, the gamma argument to the png.Writer() class will generate a gAMA chunk.
Ignored when reading. Not generated.
When reading a PNG image the sBIT chunk will make PyPNG rescale the pixel values so that they all have the width implied by the sBIT chunk. It is possible for a PNG image to have an sBIT chunk that specifies 3 different values for the significant bits in each of the 3 colour channels. In this case PyPNG only uses the largest value. When writing a PNG image, an sBIT chunk will be generated if need according to the bitdepth argument specified. Values other than 1, 2, 4, 8, or 16 will generate an sBIT chunk, as will values less than 8 for images with more than one plane.
Ignored when reading. Not generated.
Ignored when reading. Not generated.
Ignored when reading. Not generated.
Ignored when reading. Not generated.
When a PNG image is read, a bKGD chunk will add the background key to the info dictionary. When writing a PNG image, a bKGD chunk will be generated when the background argument is used.
Ignored when reading. Not generated.
Ignored when reading. Not generated.
Ignored when reading. Not generated.
Ignored when reading. Not generated.
Generally it is not possible to generate PNG images with any other chunk types. When reading a PNG image, processing it using the chunk interface, png.Reader.chunks, will allow any chunk to be processed (by user code).