paint output to file

Chris Murphy murphyc at cgrb.orst.edu
Thu Jul 16 13:29:49 EDT 1992


Allan Branscomb (allanb at oregon.uoregon.edu) writes: 
> I want to capture the output of p.map to a file for transport to another site.
> Can someone tell me how this is done?  

You can use p.select to choose ppm as your device driver, and p.map will save 
the file paint.ppm to your home directory (note: not your $LOCATION or current 
working directory if different than your home directory).  

If you wish to convert the ppm file to another format, you can use the PBMPlus
utilities (available by anonymous ftp from export.lcs.mit.edu, and part of the
GRASS distribution) to convert between ppm, gif, pcx, tif, and a host of
other formats.  E.g., to convert the ppm to a named oregon,

                  ppmtopcx paint.ppm > oregon.pcx

Another option, if you are using an X terminal to display graphics, is to 
capture the graphic in your window by way of xwd, the X-window dump utility.
You can direct the output to your_file.xwd, which can then be converted or 
modified, or printed directly using xpr, the X-window dump printing utility
(both utilities available from the ftp site mentioned above, or are included
with your X software).  E.g., to save to an encapsulated PostScript file,
	 
xwd | xwdtopnm | ppmtops > oregon.ps

  or, to print through a PostScript printer,

xwd > oregon.xwd ; 
xpr -device ps [other options] oregon.xwd | lpr -Pyour_printer

We use these options regularly and with great success; they are wonderful
tools.  If you have more specific questions, let me know--I'm just right
up the road.  Hope this is of some help.

Chris Murphy  murphyc at cgrb.orst.edu
Oregon State University / Entomology
Corvallis, Oregon USA



More information about the grass-user mailing list