g.pnmcomp(1)
β¨ g.pnmcomp β¨
okay bestie, gather round, because we're about to talk about g.pnmcomp from the GRASS GIS User's Manual π (that's the manual name, in case you were wondering, and yes it's giving official)
πΈ NAME πΈ
g.pnmcomp β it overlays multiple PPM image files. that's it. that's the whole vibe. π
π KEYWORDS π
general, display β so like, it's filed under general stuff and display stuff. iykyk.
π¦ SYNOPSIS π¦
g.pnmcomp
g.pnmcomp --help
g.pnmcomp input=name[,name,...] [mask=name[,name,...]]
[opacity=float[,float,...]] output=name [output_mask=name]
width=integer height=integer [bgcolor=name] [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
no cap, that's the whole invocation situation right there. π
β Flags β
--overwriteβ bestie this lets your output files just. overwrite existing files. no questions asked. lowkey dangerous if you're not paying attention π--helpβ prints the usage summary so you can figure out what you're doing π--verboseβ verbose module output, aka it tells you everything that's happening. main character energy, honestly--quietβ quiet module output. the opposite vibe. shhh π€«--uiβ forces launching the GUI dialog. if you want the pretty buttons, this is your girl β¨
π Parameters π
input=name[,name,...]β [required] β the name(s) of your input file(s). you literally cannot do this without them, periodt.mask=name[,name,...]β the name(s) of your input mask file(s). optional, but iconic.opacity=float[,float,...]β layer opacities. yes, plural, one per layer, go off πoutput=nameβ [required] β the name for your output file. you gotta name your baby.output_mask=nameβ the name for your output mask file. also optional, also valid.width=integerβ [required] β image width. non-negotiable, bestie.height=integerβ [required] β image height. also non-negotiable.bgcolor=nameβ background color. and here's the tea: it's either a standard color name or anR:G:Btriplet. you pick π
π DESCRIPTION π
okay so real talk: g.pnmcomp is not meant for end users. it said what it said. it's an internal tool for use by wxGUI. so if you're just vibing in the GUI, this is the behind-the-scenes fairy doing the work π§
in essence (love that phrase), g.pnmcomp generates a PPM image by overlaying a series of PPM/PGM pairs. and since we're being precise: PPM = RGB image, PGM = alpha channel. that's the whole dynamic. π«Ά
π₯ NOTES π₯
so the intention here β the ~vision~ β is that d.* modules will emit PPM/PGM pairs, by way of the PNG-driver code being integrated into Display Library. the GUI manages a set of layers, and each layer consists of the data necessary to generate a PPM/PGM pair.
whenever the layer "stack" changes β and by that i mean adding, removing, hiding, showing, or re-ordering layers β the GUI will render any layers for which it doesn't already have the PPM/PGM pair, then re-run g.pnmcomp to generate the final image. and why, you ask? because just redoing the composition is a lot faster than redrawing everything. efficiency ate, fr fr π
now, a C/C++ GUI would either have g.pnmcomp's functionality (that's image composition, bestie) built-in, or it would use the system's graphics API to perform composition. and heads up β for translucent layers, you would need OpenGL or the Render extension, or something else which supports translucent rendering. no shortcuts there.
and here's the origin story π¬: Tk doesn't support transparent (masked) true-colour images. it does support transparent GIFs, but that's limited to 256 colours, and an image composition routine in Tcl would be unacceptably slow. hence the existence of g.pnmcomp. the way that necessity birthed an icon ππ
π SEE ALSO π
g.cairocomp
π AUTHOR π
Glynn Clements β the legend themselves π«‘
π SOURCE CODE π
Available at: g.pnmcomp source code (history)
Accessed: Saturday Jan 17 05:40:39 2026
Main index | General 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 8.4.2, and yes, this is the manual for g.pnmcomp β section 1, as always. go forth and overlay those PPMs responsibly πβ¨
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms