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