.TH r.out.ppm 1grass "" "GRASS 7.8.5" "GRASS GIS User's Manual" .SH NAME \fI\fBr.out.ppm\fR\fR \- Converts a GRASS raster map to a PPM image file. .SH KEYWORDS raster, export, output .SH SYNOPSIS \fBr.out.ppm\fR .br \fBr.out.ppm \-\-help\fR .br \fBr.out.ppm\fR [\-\fBgh\fR] \fBinput\fR=\fIname\fR [\fBoutput\fR=\fIname\fR] [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-g\fR" 4m .br Output greyscale instead of color .IP "\fB\-h\fR" 4m .br Suppress printing of PPM header .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBinput\fR=\fIname\fR \fB[required]\fR" 4m .br Name of input raster map .IP "\fBoutput\fR=\fIname\fR" 4m .br Name for new PPM file (use \(cq\-\(cq for stdout) .br Default: \fI.ppm\fR .SH DESCRIPTION \fIr.out.ppm\fR converts a GRASS raster map into a PPM image at the pixel resolution of the CURRENTLY DEFINED REGION. To get the resolution and region settings of the raster map, run: .PP .br .nf \fC g.region \-p raster=[mapname] \fR .fi .PP before running \fIr.out.ppm\fR. .PP By default the PPM file created is 24\-bit color, rawbits storage. You can use the \fB\-g\fR flag to force \fIr.out.ppm\fR to output an 8\-bit greyscale instead. The greyscale conversion uses the NTSC conversion: .PP .br .nf \fC Y = .30*Red + .59*Green + .11*Blue \fR .fi .PP One pixel is written for each cell value, so if ew_res and ns_res differ, the aspect ratio of the resulting image will be off. .SH NOTES A few ppm file comments are written: the name of the GRASS raster map, resolution, etc. Although these are perfectly legal, I\(cqve found one PD image utility that chokes on them, so if you need a commentless PPM file, use \(cqout=\- > outfile.ppm\(cq. (When sending output to stdout, no comments are written.) .SH HINTS You can create a PNG image with NULL values represented by a transparent background by using the PNG driver with GRASS_RENDER_TRANSPARENT set to TRUE. Alternatively, you can use the \fIpnmtopng\fR program from netpbm to do this: .br .nf \fC r.out.ppm raster pnmtopng \-transparent white raster.ppm > raster.png \fR .fi .SH SEE ALSO \fI d.out.file, r.out.ascii, r.out.gdal, r.out.mpeg, r.out.png, r.out.ppm3 \fR .SH AUTHOR Bill Brown, UIUC .SH SOURCE CODE .PP Available at: r.out.ppm source code (history) .PP Main index | Raster index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual