d.out.file(1) - Linux man page
Name
d.out.file - Saves the contents of the active display monitor to a graphics file.
Keywords
display, export
Synopsis
d.out.file
d.out.file help
d.out.file [-btcr] output=string format=string [resolution=integer] [size=width,height]
[compression=integer] [quality=integer] [paper=string] [ps_level=integer] [--verbose]
[--quiet]
Flags:
- -b
- Set background color to black (white default)
- -t
- Set transparent background
- -c
- Use the Cario driver to render images
- -r
- Set paper orientation to landscape (for PostScript output)
- --verbose
- Verbose module output
- --quiet
- Quiet module output
Parameters:
- output=string
- Name for output file (do NOT add extension)
- format=string
- Graphics file format
Options: png,ppm,tif,jpg,bmp,ps,eps,svg,pdf
Default: png - resolution=integer
- Dimensions of output file versus current window size
(same=1, double size=2, quadruple size=4)
Default: 1 - size=width,height
- Width and height of output image (overrides resolution setting)
- compression=integer
- Compression for PNG files
(0=none, 1=fastest, 9=most; lossless, only time vs. filesize)
Options: 0-9
Default: 9 - quality=integer
- File size/quality for JPEG files
(10=smallest/worst, 100=largest/best)
Options: 10-100
Default: 75 - paper=string
- Paper size for PostScript output
Options: a4,a3,a2,a1,a0,us-letter,us-legal,us-tabloid
Default: a4 - ps_level=integer
- PostScript level (only limits functionality!)
Options: 1-3
Default: 2
Description
(GRASS Shell Script)
d.out.file uses d.save, the GRASS PNG or PostScript driver, and gdal_translate to export the currently selected X display monitor to a graphics file of several formats. Output image size can be set prior to export.
PNG and PPM formats are supported directly by the GRASS PNG driver and PostScript output is supported directly by the GRASS PS driver.
TIFF, JPEG, and BMP formats are supported by using gdal_translate on PPM format files produced by the GRASS PNG driver. Different levels of compression/quality are supported for JPEG files.
Graphic files are exported to the user's current working directory by default, but different paths may be specified in the output field.
EPS files are not compatible with d.frame, as it is not possible to nest encapsulation. Only the first frame will be drawn. In these cases it is recommended to output to regular PostScript format and then use a utility like ps2epsi to convert to an EPS file. Output from this module using the regular PostScript format may contain subframes.
Examples
Speafish dataset
- g.region rast=slope -p
d.mon x0
d.rast slope
d.vect streams type=area,line
d.barscale at=0,94.5
d.out.file spearfish_pic format=png size=800,600
d.out.file spearfish_pic format=ps -r paper=a4
Multi-pane PostScript output using a shaded relief map and
- d.frame.quarter from the Wiki-Addons site
g.region rast=elevation.dem
r.shaded.relief map=elevation.dem shad=elev.shad_relf
d.mon x1
d.frame.quarter
d.frame uno
d.his h=elevation.dem i=elev.shad_relf brighten=50
echo "A" | d.text -b color=black size=10 at=93,5
d.frame dos
d.his h=slope i=elev.shad_relf brighten=40
echo "B" | d.text -b color=black size=10 at=93,5
d.frame tres
d.his h=landcover.30m i=elev.shad_relf brighten=55
echo "C" | d.text -b color=black size=10 at=93,5
d.frame cuatro
d.his h=trn.sites i=elev.shad_relf brighten=15
echo "D" | d.text -b color=black size=10 at=93,5
d.frame full_screen
d.out.file spearfish_4 format=ps -r paper=a4
See Also
d.frame, d.mon, d.out.png, d.save, ps.map
Cairo driver, PNG driver, PostScript driver, HTML-map driver, X driver
GDAL Homepage
Authors
Michael Barton, Arizona State University
Hamish Bowman, Otago University, New Zealand
Last changed: $Date: 2007-11-29 14:24:57 +0100 (Thu, 29 Nov 2007) $
Full index
© 2003-2008 GRASS Development Team
