next up previous contents index
Next: read-pnm pathname procedure Up: Tips and useful procedures Previous: Repeatable experiments

PNM images


There are a handful of procedures for using portable anymap (PNM) images [6]. Images are useful for providing stimuli to processors with light-sensors.

These procedures are restricted to binary or raw anymaps, and the maxpixel values of a graymap (PGM) or pixmap (PPM, colour) must be 255. The value of a pixel depends on the type of image. Bitmaps (PBMs) have pixel value of 0 (black) and 1 (white). Graymaps have intensity levels between 0 (black) and 255 (white). Colour images have integer pixel values representing a colour as a RGB triple. The encoding expressed as a hexadecimal number is #xrrggbb, where rr represents the 8 bits for the red component (between 0 and 255) etc.

Erik Rauch
Sat May 8 16:42:57 EDT 1999