There are dozens of formats used for graphics files across the computer industry. There are tiff files, PICT files, and gif files. There are different formats for displaying on different hardware, different formats for printing on different printers, and then there are the internal formats used by graphics programs. This means that importing a graphics file from one platform to another (or from one program to another) can be a large undertaking, requiring a filter written specially to convert from one format to the next.
The idea behind pbm is to use a set of very basic graphics formats that (almost) all formats can be converted into and then converted back from. This is much simpler than having converters to and from each individual format. These formats are known as pbm , pgm , and ppm : the portable bitmap, graymap, and pixmap formats. (A bitmap is a two-dimensional representation of an image; a graymap has additional information encoded that gives grayscale information for each bit; a pixmap encodes color information for each bit.) The name " pnm " is a generic name for all three portable interchange formats (with the n standing for "a n y"), and programs that work with all three are said to be "anymap" programs.
The netpbm package contains well over a hundred conversion programs. There are three basic kind of programs:
I frequently like to createbitmaps out of pictures in newspapers or magazines. The way I do this is to first scan the picture in on a Macintosh and save it as tiff or PICT format. Then I the file to our UNIX system and convert it to pnm format, and then use pbmtoxbm to convert it to X bitmap format. If the picture is too big, I use pnmscale on the intermediary pnm file. If the picture isn't right-side-up, I can use pnmrotate and sometimes pnmflip before converting the pnm file to X11 bitmap format.
The programs provided with the netpbm package are far too many to discuss in detail, and some of these formats are ones that you've probably never even heard of. But here's a summary of them. Table 43.2 lists the conversion programs. Table 43.3 lists the programs that perform various kinds of editing, enhancement, or transformations on image files.