## NAME

p.ppm - Reads portable pixmap (ppm) files created by PPM utilities.
(GRASS Paint/Print Program)

## SYNOPSIS

p.ppm
p.ppm help
p.ppm [-f] [input=name]

## DESCRIPTION

This program, p.ppm, reads a user-specified portable pixmap (ppm) file and outputs it to the currently selected printer (see p.select). The input ppm file should be one that has been created using the PPM utilities developed by Jeff Poskanzer. These utilities can import various image formats (including Sun raster, X Windows pixmaps, and others) into the PPM formats ppm (color pixmaps), pgm (grey scale maps), and pbm (black and white bit-maps).

If the image doesn't fit the output device, it won't get printed. If you want the image printed (but clipped), use the p.ppm -f option, or scale the input using ppmscale, or rotate the image using ppmrotate (if it will fit that way -- otherwise you might have to scale it as well). If the image doesn't fit, p.ppm will tell you what scaling value to enter to ppmscale that will make it fit.

## EXAMPLES

If the user is running GRASS under SunOS, the following command could be used to send a monitor screen image to the printer:

  screendump | rasttoppm | p.ppm

If you are running suntools, the user might type:

  sleep 10; screendump | rasttoppm | ppmrotate 90 | p.ppm

The UNIX sleep command allows you time to arrange the frames before the screen dump starts. The ppmrotate is usually needed because the Sun screens are wider than they are long (and wider than 1024 pixels - which is the width of most of our printers).

If you are running X, the user might type:

  xwd | xwdtoppm | ppmrotate 90 | p.ppm

## NOTES

This program only supports the ppm binary format (P6).

Maximum color level is 255. If the ppm file has more color levels, use ppmcscale to reduce the number of colors.

No scaling is done. Use ppmscale to change image size.

No rotation is done. Use ppmrotate to rotate the image.

## SEE ALSO

See also:

The PPM utilities ppmrotate (rotates ppm images), ppmscale (scales ppm images for printing), rasttoppm (converts a Sun raster file to ppm format), and xwdtoppm (converts an X Windows dump file to ppm format).

The SunOS program screendump (dumps the image on the color graphics monitor into a file in Sun raster file format).

The X program xwd (dumps the image in an X window into a file in X window dump [xwd] format).

The GRASS programs
d.save
p.map
p.select
parser

## AUTHOR

Michael Shapiro, U.S.Army Construction Engineering Research Laboratory

This program uses the PPM utilities, developed by Jeff Poskanzer.

Last changed: $Date: 2002/01/25 05:45:34 $