NAME

r.in.ppm - Converts an ASCII/BINARY PPM image file to a GRASS raster file.
(GRASS Raster Data Import Program)

SYNOPSIS

r.in.ppm [-vb] input=name output=name [nlev=value]

DESCRIPTION

This program converts a PPM raster file to a GRASS raster file. Output is placed in the /cell directory under the user's current GRASS mapset. Optionally, the user is asked to enter the maximum number of levels for each band; The default value is 20 (= 20 x 20 x 20 = 8000 colors). If the number of colors in the PPM raster file is greater than the maximum number of colors, a quantized color table is created and each color of the PPM raster file assigned to the nearest available color. Optionally, the program creates 3 separate raster maps of the (true) red, green and blue levels. Currently PPM ASCII and PPM BINARY (PBM) formats are supported.

OPTIONS

Flag:

-v
Verbose mode
-b
Create 3 separate raster maps of the (true) R/G/B levels

Parameters:

input=name
Name of an existing PPM raster file to be imported.
output=name
Name to be assigned to resultant binary raster map layer.
nlev=value
Max number of levels for R/G/B.
options: 1-256
default: 20 (= 8000 colors)

NOTES

R/G/B levels: each output raster map layer is given a linear gray scale color table. Each output raster map layer is assigned the user-specified output with (.r, .g, .b) suffix.

The user should adjust boundary coordinates stored in the cell header after import using r.support and parser

SEE ALSO

r.in.pbm

AUTHOR

Stefano Merler, ITC-irst (Italy)