png_write_png

Name

png_write_png -- write the entire PNG file

Synopsis

#include <png.h>

void png_write_png(png_structp png_ptr, png_infop info_ptr, int transforms, png_voidp params);

Description

png_write_png() shall provide the high-level write operation. The function shall write the PNG stream if the entire image information is available in png_ptr. The integer "transforms" shall contain the logical OR of a set of the following transformation flags:

PNG_TRANSFORM_IDENTITY

No transformation

PNG_TRANSFORM_PACKING

Expand 1, 2 and 4-bit samples to bytes

PNG_TRANSFORM_PACKSWAP

Change order of packed pixels to LSB first

PNG_TRANSFORM_INVERT_MONO

Invert monochrome images

PNG_TRANSFORM_SHIFT

Normalize pixels to the sBIT depth

PNG_TRANSFORM_BGR

Flip RGB to BGR, RGBA to BGRA

PNG_TRANSFORM_SWAP_ALPHA

Flip RGBA to ARGB or GA to AG

PNG_TRANSFORM_INVERT_ALPHA

Change alpha from opacity to transparency

PNG_TRANSFORM_SWAP_ENDIAN

Byte-swap 16-bit samples

PNG_TRANSFORM_STRIP_FILLER

Strip off filler bytes

"params" is unused and must be set to NULL.