r.out.png(1)

πŸ’… r.out.png β€” the GRASS GIS girlies' guide

ok so bestie, welcome to r.out.png, a lil member of the GRASS GIS User's Manual family. she's a raster-to-PNG baddie and she does NOT do georeferencing unless you ask nicely. let's get into it πŸ’–


✨ NAME ✨

r.out.png β€” Export a GRASS raster map as a non-georeferenced PNG image. periodt. πŸ–ΌοΈ


🏷️ KEYWORDS 🏷️

raster, export, output, PNG


🌸 SYNOPSIS 🌸

r.out.png
r.out.png --help
r.out.png [-tw] input=name output=name  [compression=integer]
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags:

  • -t β€” Make NULL cells transparent. yes queen, transparency. πŸ«₯✨
  • -w β€” Output world file. giving your PNG a lil georeferencing moment.
  • --overwrite β€” Allow output files to overwrite existing files. no take-backs.
  • --help β€” Print usage summary.
  • --verbose β€” Verbose module output. she will tell you EVERYTHING.
  • --quiet β€” Quiet module output. she will tell you nothing. mystery woman energy.
  • --ui β€” Force launching GUI dialog.

🧚 Parameters:

  • input=name [required] β€” Name of input raster map.
  • output=name [required] β€” Name for new PNG file (use '-' for stdout).
  • compression=integer β€” Compression level of PNG file.
    • (0 = none, 1 = fastest, 9 = best)
    • Options: 0-9
    • Default: 6

πŸ’– DESCRIPTION πŸ’–

okay so r.out.png exports a GRASS GIS raster map in non-georeferenced Portable Network Graphics (PNG) image format, and she respects the current region resolution and bounds. no cap. literally she looks at your region and says "yes bestie, those bounds, that resolution, got it." πŸ‘‘

Optionally the user can choose to export a World File (.wld) to provide basic georeferencing support. lowkey iconic. When used with the transparency flag this can create images useful for KML, TMS, or WMS overlays. (e.g. for use in Google Earth or as OpenLayers tiles) πŸ—ΊοΈβœ¨

heads up bestie: If output is redirected to stdout, the world file will be called png_map.wld. yes, that name specifically. she decided.

🌈 EXAMPLE 🌈

The example is based on the North Carolina sample data. πŸ“

Export of the soil map to PNG format with world file:

g.region raster=soils_Kfactor -p
# export PNG file with additional world file
r.out.png input=soils_Kfactor output=soils_Kfactor -w
# verify
gdalinfo soils_Kfactor.png

look at her go. gdalinfo said "valid" and we all cheered. πŸ˜­πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

r.out.gdal, r.out.ppm, r.out.ascii, r.import


πŸ‘‘ AUTHORS πŸ‘‘

Alex Shevlakov Hamish Bowman

the founding mothers/fathers of this whole vibe, we stan. 🫢


πŸ”₯ SOURCE CODE πŸ”₯

Available at: r.out.png source code (history)

Accessed: Saturday Jan 17 05:40:52 2026

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual


and that's the whole page, bestie!! πŸ’œ this was GRASS GIS 8.4.2 reference manual realness, accessed Saturday Jan 17 05:40:52 2026, brought to you by the Β© 2003-2025 GRASS Development Team β€” r.out.png(1), out. πŸŽ€βœ¨ go export something cute. πŸ¦‹

πŸ“¦ where this page comes from