![]() |
![]()
| ![]() |
![]()
PNG DISPLAY DRIVERPNG display driver to create PNG, PPM, or BMP images. DESCRIPTIONThe PNG driver generates PNG, PPM, or BMP images from GRASS display commands. Per default PNG files are written with this driver. This driver is used by default if Cairo driver is not available. USAGEEnvironment variablesThe PNG driver can be enabled by setting
GRASS_RENDER_IMMEDIATE variable, eg.
export GRASS_RENDER_IMMEDIATE=png Several environment variables affect the operation of the PNG driver:
Exampleexport GRASS_RENDER_IMMEDIATE=png export GRASS_RENDER_TRUECOLOR=TRUE g.region raster=elevation d.rast elevation d.vect roadsmajor color=red This writes a file named map.png in your current directory. NOTESThe 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 output images is defined by current region extents. Use g.region -p to get the number of rows and cols and use the environment variables to set the image size. If you would like a larger image, multiply 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 Cairo driver, PS driver, HTML driver,
variables
AUTHORSOriginal version: Per Henrik Johansen <phj (at)
norgit.no>
SOURCE CODEAvailable at: PNG DISPLAY DRIVER source code (history) Accessed: Saturday Jul 19 12:05:26 2025 Main index | Topics index | Keywords index | Graphical index | Full index © 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual
|