libppm - portable pixmap manipulation library.

  1. About
  2. Examples
  3. Download
  4. Changelog
  5. Contact

PNM (portable anymap) is a set of simple file formats designed to represent raster images. PNM files come in three flavors:

All these files can have two formats - plain (ASCII) and raw (binary):

PNM images can be manipulated using netpbm package.

libppm is a lightweight, P6-type image manipulation C library than can handle both 24-bit (standard) and 48-bit (extended) RGB images. It provides basic operations on pixmaps:

It's advantages include:

However, it lacks:

If you need these features, consider using more advanced libnetpbm.

Attached are three example programs that show how to use this library:

normalize code can be tested on those 24- and 48-bit files:

24-bit source 48-bit source

It should produce 24- and 48-bit ppm files equal to those:

24-bit result 48-bit result

heart can be used to generate different looking hearts. Examples:

h1 h2 h3 h4

histogram analyzes input image and draws it's RGB histogram. Example:

histin histout

Download snapshot: libppm-20090622.tar.gz (md5)
Snapshots are generated daily at 07:00 CET. They require C compiler (possibly gcc), binutils, make, libtool and libc. heart requires libm.

Subversion access: http://svn.chmurka.net/libppm/trunk/libppm/
SVN version in addition to snapshot requirements requires autoconf and automake.

Changelog: changelog.php (rss)

Contact: gophi (at) chmurka.net