Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 413e0bdb3c48563b2d8d9038d07d5533 > files > 1520

grass-6.3.0-15.fc13.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>GRASS GIS: d.out.file</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">

<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>

<h2>NAME</h2>
<em><b>d.out.file</b></em>  - Saves the contents of the active display monitor to a graphics file.
<h2>KEYWORDS</h2>
display, export
<h2>SYNOPSIS</h2>
<b>d.out.file</b><br>
<b>d.out.file help</b><br>
<b>d.out.file</b> [-<b>btcr</b>] <b>output</b>=<em>string</em> <b>format</b>=<em>string</em>  [<b>resolution</b>=<em>integer</em>]   [<b>size</b>=<em>width,height</em>]   [<b>compression</b>=<em>integer</em>]   [<b>quality</b>=<em>integer</em>]   [<b>paper</b>=<em>string</em>]   [<b>ps_level</b>=<em>integer</em>]   [--<b>verbose</b>]  [--<b>quiet</b>] 

<h3>Flags:</h3>
<DL>
<DT><b>-b</b></DT>
<DD>Set background color to black (white default)</DD>

<DT><b>-t</b></DT>
<DD>Set transparent background</DD>

<DT><b>-c</b></DT>
<DD>Use the Cario driver to render images</DD>

<DT><b>-r</b></DT>
<DD>Set paper orientation to landscape (for PostScript output)</DD>

<DT><b>--verbose</b></DT>
<DD>Verbose module output</DD>
<DT><b>--quiet</b></DT>
<DD>Quiet module output</DD>
</DL>

<h3>Parameters:</h3>
<DL>
<DT><b>output</b>=<em>string</em></DT>
<DD>Name for output file (do NOT add extension)</DD>

<DT><b>format</b>=<em>string</em></DT>
<DD>Graphics file format</DD>
<DD>Options: <em>png,ppm,tif,jpg,bmp,ps,eps,svg,pdf</em></DD>
<DD>Default: <em>png</em></DD>

<DT><b>resolution</b>=<em>integer</em></DT>
<DD>Dimensions of output file versus current window size</DD>
<DD>(same=1, double size=2, quadruple size=4)</DD>
<DD>Default: <em>1</em></DD>

<DT><b>size</b>=<em>width,height</em></DT>
<DD>Width and height of output image (overrides resolution setting)</DD>

<DT><b>compression</b>=<em>integer</em></DT>
<DD>Compression for PNG files</DD>
<DD>(0=none, 1=fastest, 9=most; lossless, only time vs. filesize)</DD>
<DD>Options: <em>0-9</em></DD>
<DD>Default: <em>9</em></DD>

<DT><b>quality</b>=<em>integer</em></DT>
<DD>File size/quality for JPEG files</DD>
<DD>(10=smallest/worst, 100=largest/best)</DD>
<DD>Options: <em>10-100</em></DD>
<DD>Default: <em>75</em></DD>

<DT><b>paper</b>=<em>string</em></DT>
<DD>Paper size for PostScript output</DD>
<DD>Options: <em>a4,a3,a2,a1,a0,us-letter,us-legal,us-tabloid</em></DD>
<DD>Default: <em>a4</em></DD>

<DT><b>ps_level</b>=<em>integer</em></DT>
<DD>PostScript level (only limits functionality!)</DD>
<DD>Options: <em>1-3</em></DD>
<DD>Default: <em>2</em></DD>

</DL>
<H2>DESCRIPTION</H2>
<EM>(GRASS Shell Script)</EM>
<P>
<EM><b>d.out.file</b></EM> uses <em>d.save</em>, the GRASS PNG or PostScript
driver, and <tt>gdal_translate</tt> to export the currently selected X display
monitor to a graphics file of several formats. Output image size can be set
prior to export.
<P>
PNG and PPM formats are supported directly by the GRASS PNG driver and
PostScript output is supported directly by the GRASS PS driver.
<P>
TIFF, JPEG, and BMP formats are supported by using <tt>gdal_translate</tt>
on PPM format files produced by the GRASS PNG driver. Different levels of
compression/quality are supported for JPEG files.
<P>
Graphic files are exported to the user's current working directory by
default, but different paths may be specified in the output field.
<P>
EPS files are not compatible with <em>d.frame</em>, 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 <tt>ps2epsi</tt> to convert to an EPS file.
Output from this module using the regular PostScript format may contain
subframes.


<H2>EXAMPLES</H2>

<h4>Speafish dataset</h4>

<div class="code"><pre>
  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
</pre></div>
<BR>

<h4>Multi-pane PostScript output using a shaded relief map and 
<a href="http://grass.gdf-hannover.de/wiki/GRASS_AddOns#Display_add-ons">d.frame.quarter</a>
from the Wiki-Addons site</h4>

<div class="code"><pre>
  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
</pre></div>


<H2>SEE ALSO</H2>

<EM>
<A HREF="d.frame.html">d.frame</A>,
<A HREF="d.mon.html">d.mon</A>,
<A HREF="d.out.png.html">d.out.png</A>,
<A HREF="d.save.html">d.save</A>,
<A HREF="ps.map.html">ps.map</A></EM><BR>
<A HREF="cairodriver.html">Cairo driver</A>,
<A HREF="pngdriver.html">PNG driver</A>,
<A HREF="psdriver.html">PostScript driver</A>,
<A HREF="htmlmapdriver.html">HTML-map driver</A>,
<A HREF="xdriver.html">X driver</A><BR>
<A HREF="http://www.gdal.org">GDAL Homepage</a>


<H2>AUTHORS</H2>

Michael Barton, Arizona State University<BR>
Hamish Bowman, Otago University, New Zealand
<p>
<i>Last changed: $Date: 2007-11-29 14:24:57 +0100 (Thu, 29 Nov 2007) $</i>
<HR>
<P><a href="index.html">Main index</a> - <a href="display.html">display index</a> - <a href="full_index.html">Full index</a></P>
<P>&copy; 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
</body>
</html>