Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
pngdriver(1)		      Grass User's Manual		  pngdriver(1)

NAME
	PNG driver - driver to create PNG and PPM images.
       (drivers)

DESCRIPTION
       The  PNG	 driver	 generates  PNG	and PPM	images from GRASS display com-
       mands.  Per default PNG files are  written  with	 this  driver.	It  is
       started	as 'pseudo' monitor (image file	instead) and when stopped, all
       output from previously used display commands are	written	to the PNG im-
       age file.

USAGE
   Environment variables
       Several environment variables affect the	operation of the PNG driver.
	      GRASS_WIDTH=xxx
	      the width	of the image map (default is 640).
	      GRASS_HEIGHT=yyy
	      the height of the	image map (default is 480).
	      GRASS_PNGFILE=filename
	      the  filename to put the resulting image in, default is map.png.
	      If you set GRASS_PNGFILE to a filename which ends	in  ".ppm",  a
	      PPM file will be created (with alpha channel stored in a PGM im-
	      age, if applicable).  If you set	GRASS_PNGFILE  to  a  filename
	      which  ends  in ".bmp", a	32-bpp BMP file	will be	created	(these
	      are not readable by some older viewers).

	      GRASS_BACKGROUNDCOLOR=RRGGBB
	      specifies	the background color to	use in RGB notation (hex  val-
	      ues). Default is 000000 (black).
	      GRASS_TRANSPARENT=[TRUE|FALSE]
	      sets transparent background on (TRUE) or off (FALSE, default).
	      GRASS_TRUECOLOR=[TRUE|FALSE]
	      sets true-color support
	      GRASS_PNG_COMPRESSION=[0|1|9]
	      compression level	of PNG files (0	= none,	1 = fastest, 9 = best,
	      default is 6)
	      GRASS_PNG_AUTO_WRITE=[TRUE|FALSE]
	      if set to	TRUE, the image	file will be written after each	opera-
	      tion  (i.e. whenever a client disconnects), rather than only be-
	      ing written out when the driver terminates.
	      GRASS_PNG_READ
	      if TRUE, the PNG driver will initialize the image	from the  con-
	      tents of GRASS_PNGFILE.
	      GRASS_PNG_MAPPED
	      if  TRUE,	 the  PNG  driver will map GRASS_PNGFILE as its	frame-
	      buffer, rather than using	 memory.  This	only  works  with  BMP
	      files.
	      GRASS_RENDER_IMMEDIATE=[TRUE|FALSE]
	      tells  the  raster library to use	its built-in PNG driver	rather
	      than connecting to an external monitor process using sockets. If
	      TRUE, there is no	need to	run d.mon start=PNG.

   Example
       Define driver settings (here: bash shell	syntax)
       export GRASS_RENDER_IMMEDIATE=TRUE
       export GRASS_TRUECOLOR=TRUE
	Start up the driver
       d.mon start=PNG
	Display	raster map and vector polygons
       d.rast somerastermap
       d.vect somevectormap color=red
	 Stop the driver subsequently. This will write a file named map.png to
       be created in your current directory:
       d.mon stop=PNG

NOTES
       The PNG driver uses the libpng (see the libpng home page) and zlib (see
       the zlib	home page), all	which needs to be installed for	the PNG	driver
       to work (it's worth it).

       The resolution of the PNG raster	map is defined by the map extents. Use
       g.region	 -p to get the number of rows and cols and use the environment
       variables to set	the PNG	size. If you would like	a larger image,	multi-
       ply  both rows and cols by the same whole number	to preserve the	aspect
       ratio.

       Further PNG file	processing (e.g. quantization to 1 bit for  monochrome
       images) can be done with	'pnmquant' of the netpbm tools.

SEE ALSO
	Display	drivers
       HTMLMAP driver, PostScript driver, XDRIVER
       d.frame,	d.mon, d.rast, d.vect

AUTHOR
       Original	version: Per Henrik Johansen  NORGIT AS
       Rewritten by: Glynn Clements, 2003

       Last changed: $Date: 2016-08-18 08:50:38	+0200 (Thu, 18 Aug 2016) $

       Full index

       (C) 2003-2016 GRASS Development Team

GRASS 6.4.6							  pngdriver(1)

NAME | DESCRIPTION | USAGE | NOTES | SEE ALSO | AUTHOR

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=pngdriver&sektion=1&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help