This demonstrates the use of PNG_USER_CONFIG and pngusr.h The makefile builds a minimal write-only encoder with embedded libpng and zlib. Specify the location of the zlib source (1.2.1 or later) as ZLIBSRC on the make command line. If you prefer to use the shared libraries, go to contrib/pngminus and build the pnm2png application there.