1r.out.ppm(1) Grass User's Manual r.out.ppm(1)
2
3
4
6 r.out.ppm - Converts a GRASS raster file to a PPM image file at the
7 pixel resolution of the CURRENTLY DEFINED REGION.
8
10 raster
11
13 r.out.ppm
14 r.out.ppm help
15 r.out.ppm [-qG] input=string [output=string]
16
17 Flags:
18 -q Run quietly
19
20 -G Output greyscale instead of color
21
22 Parameters:
23 input=string
24 Raster input map
25
26 output=string
27 Name for new PPM file. (use out=- for stdout) Default: .ppm
28
30 r.out.ppm converts a GRASS raster file into a PPM image at the pixel
31 resolution of the CURRENTLY DEFINED REGION. To get the resolution and
32 region settings of the raster map, run:
33
34
35 g.region -p rast=[mapname]
36
37
38 before running r.out.ppm.
39
40 By default the PPM file created is 24-bit color, rawbits storage. You
41 can use the -G flag to force r.out.ppm to output an 8-bit greyscale
42 instead. The greyscale conversion uses the NTSC conversion:
43
44
45 Y = .30*Red + .59*Green + .11*Blue
46
47
48 One pixel is written for each cell value, so if ew_res and ns_res dif‐
49 fer, the aspect ratio of the resulting image will be off.
50
52 A few ppm file comments are written: the name of the GRASS raster file,
53 resolution, etc. Although these are perfectly legal, I've found one PD
54 image utility that chokes on them, so if you need a commentless PPM
55 file, use 'out=- > outfile.ppm'. (When sending output to stdout, no
56 comments are written.)
57
59 You can create a PNG image with NULL values represented by a transpar‐
60 ent background by using the PNG driver with GRASS_TRANSPARENT set to
61 TRUE. Alternatively, you can use the pnmtopng program from netpbm to
62 do this:
63 r.out.ppm raster
64 pnmtopng -transparent white raster.ppm > raster.png
65
66
68 d.out.png
69 r.out.ascii
70 r.out.mpeg
71 r.out.png
72 r.out.ppm3
73 r.out.tiff
74
76 Bill Brown, UIUC
77
78 Last changed: $Date: 2007/01/28 22:18:17 $
79
80 Full index
81
82
83
84GRASS 6.2.2 r.out.ppm(1)