libpng is the official PNG reference library. It supports almost all PNG features, is extensible, and has been extensively tested for over 17 years.
libpng is available as ANSI C source code and requires zlib 1.0.4 or later (1.2.3 or 1.1.4 recommended due to potential security vulnerabilities in earlier versions). In addition to the main library sources, libpng includes the rpng, rpng2 and wpng demo programs, the pngminus demo program, a subset of Willem van Schaik's PngSuite test images, and Willem's VisualPng demo program. Configure, CMake, Visualc projects, and various makefiles are included for building libpng.