1pngdriver(1)                  Grass User's Manual                 pngdriver(1)
2
3
4

NAME

6        PNG driver  - driver to create PNG and PPM images
7       (drivers)
8

DESCRIPTION

10       The  PNG  driver  generates  PNG and PPM images from GRASS display com‐
11       mands.  Per default PNG files are written.
12

USAGE

14   Environment variables
15       Several environment variables effect the operation of the PNG driver.
16              GRASS_WIDTH=xxx
17              the width of the image map (default is 640).
18              GRASS_HEIGHT=yyy
19              the height of the image map (default is 480).
20              GRASS_PNGFILE=filename
21              the filename to put the resulting image in, default is  map.png.
22              If  you  set GRASS_PNGFILE to a filename which ends in ".ppm", a
23              PPM file will be created.
24
25              GRASS_BACKGROUNDCOLOR=RRGGBB
26              specifies the background color to use in RGB notation (hex  val‐
27              ues). Default is 000000 (black).
28              GRASS_TRANSPARENT=[TRUE|FALSE]
29              sets transparent background on (TRUE) or off (FALSE, default).
30              GRASS_TRUECOLOR=[TRUE|FALSE]
31              sets true-color support
32              GRASS_PNG_COMPRESSION=[0|1|9]
33              compression level of PNG files (0 = none, 1 = fastest, 9 = best;
34              default is 6)
35              GRASS_PNG_AUTO_WRITE=[TRUE|FALSE]
36              if set to "TRUE", the image file  will  be  written  after  each
37              operation (i.e. whenever a client disconnects), rather than only
38              being written out when the driver terminates.
39
40   Example
41
42                d.mon start=PNG
43                d.mon select=PNG
44        Display raster map and vector polygons
45
46                d.rast somerastermap
47                d.vect map=somevectormap color=red
48        Stop the driver subsequently. This will write a file named map.png  to
49       be created in your current directory:
50                d.mon stop=PNG
51
52

NOTES

54       The PNG driver uses the libpng (see the libpng home page) and zlib (see
55       the info-zip home page), all which needs to be installed  for  the  PNG
56       driver to work (it's worth it).
57
58       The resolution of the PNG raster map is defined by the map extents. Use
59       g.region -p to get the number of rows and cols and use the  environment
60       variables to set the PNG size. If you would like a larger image, multi‐
61       ply both rows and cols by the same whole number to preserve the  aspect
62       ratio.
63
64       Further  PNG file processing (e.g. quantization to 1 bit for monochrome
65       images) can be done with 'pnmquant' of the netpbm tools.
66

SEE ALSO

68        XDRIVER, d.mon, d.rast, d.vect
69

AUTHOR

71       Original version: Per Henrik Johansen
72       phj@norgit.no
73
74       NORGIT AS
75
76       Rewritten by Glynn Clements, 2003
77
78       Last changed: $Date: 2006/09/28 15:27:28 $
79
80       Full index
81
82
83
84GRASS 6.2.2                                                       pngdriver(1)
Impressum