1r.out.ppm(1)                GRASS GIS User's Manual               r.out.ppm(1)
2
3
4

NAME

6       r.out.ppm  - Converts a GRASS raster map to a PPM image file.
7

KEYWORDS

9       raster, export, output
10

SYNOPSIS

12       r.out.ppm
13       r.out.ppm --help
14       r.out.ppm  [-gh]  input=name   [output=name]    [--overwrite]  [--help]
15       [--verbose]  [--quiet]  [--ui]
16
17   Flags:
18       -g
19           Output greyscale instead of color
20
21       -h
22           Suppress printing of PPM header
23
24       --overwrite
25           Allow output files to overwrite existing files
26
27       --help
28           Print usage summary
29
30       --verbose
31           Verbose module output
32
33       --quiet
34           Quiet module output
35
36       --ui
37           Force launching GUI dialog
38
39   Parameters:
40       input=name [required]
41           Name of input raster map
42
43       output=name
44           Name for new PPM file (use ’-’ for stdout)
45           Default: <rasterfilename>.ppm
46

DESCRIPTION

48       r.out.ppm converts a GRASS raster map into a PPM  image  at  the  pixel
49       resolution  of the CURRENTLY DEFINED REGION.  To get the resolution and
50       region settings of the raster map, run:
51
52       g.region -p raster=[mapname]
53
54       before running r.out.ppm.
55
56       By default the PPM file created is 24-bit color, rawbits storage.   You
57       can  use  the  -g  flag to force r.out.ppm to output an 8-bit greyscale
58       instead.  The greyscale conversion uses the NTSC conversion:
59
60       Y = .30*Red + .59*Green + .11*Blue
61
62       One pixel is written for each cell value, so if ew_res and ns_res  dif‐
63       fer, the aspect ratio of the resulting image will be off.
64

NOTES

66       A  few ppm file comments are written: the name of the GRASS raster map,
67       resolution, etc.  Although these are perfectly legal, I’ve found one PD
68       image  utility  that  chokes  on them, so if you need a commentless PPM
69       file, use ’out=- > outfile.ppm’. (When sending output to  stdout,  no
70       comments are written.)
71

HINTS

73       You  can create a PNG image with NULL values represented by a transpar‐
74       ent background by using the PNG  driver  with  GRASS_RENDER_TRANSPARENT
75       set  to  TRUE.   Alternatively,  you  can use the pnmtopng program from
76       netpbm to do this:
77       r.out.ppm raster
78       pnmtopng -transparent white raster.ppm > raster.png
79

SEE ALSO

81        d.out.file, r.out.ascii, r.out.gdal, r.out.mpeg, r.out.png, r.out.ppm3
82

AUTHOR

84       Bill Brown, UIUC
85

SOURCE CODE

87       Available at: r.out.ppm source code (history)
88
89       Main index | Raster index | Topics index | Keywords index  |  Graphical
90       index | Full index
91
92       © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
93
94
95
96GRASS 7.8.5                                                       r.out.ppm(1)
Impressum