Introduction to libpng

The libpng package contains libraries used by other programs for reading and writing PNG files.

Package information

Additional downloads

Installation of libpng

Install libpng by running the following commands:

patch -Np1 -i ../libpng-1.2.5-link-to-proper-libs.patch &&
make prefix=/usr ZLIBINC=/usr/include \
    ZLIBLIB=/usr/lib -f scripts/makefile.linux &&
make prefix=/usr install -f scripts/makefile.linux

Command explanations

ZLIBINC=/usr/include ZLIBLIB=/usr/lib: This forces libpng to look for the zlib includes and libraries where we have them installed.

-f scripts/makefile.linux: This points make at the Linux version of the makefile as libpng doesn't use an autoconf routine. Instead it has various makefiles for different platforms.

Configuring libpng

Configuration Information

As with most libraries, there is no configuration to do, save that the library directory i.e., /opt/lib or /usr/local/lib should appear in /etc/ so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.


The libpng package contains libpng libraries and libpng-config.


png libraries

The PNG library is a collection of routines used to create and manipulate PNG format graphics files. The PNG format was designed as a replacement for GIF and, to a lesser extent, TIFF, with many improvements and extensions and lack of patent problems.


libpng-config provides configuration info for libpng.