PGMRAMP(1)
π pgmramp β the Pgmramp User Manual, but make it a group chat π
okay bestie so this is the Pgmramp User Manual, filed under General Commands Manual, and it's literally just about making a grayscale ramp. iconic, underappreciated, and honestly kinda the backbone of image math. let's get into it π
β¨ NAME β¨
pgmramp β generate a grayscale ramp π
π SYNOPSIS π
pgmramp {-lr|-tb|-rectangle|-ellipse|-diagonal} [-maxval=maxval] width
height
okay real talk, housekeeping first because it applies to EVERYTHING here: every option can be abbreviated down to its shortest unique prefix (so like, be as lazy as it's still unambiguous), you can use two hyphens instead of one to designate an option if that's your vibe, and you can put either white space or an equals sign between an option name and its value. no cap. π«Ά
π¦ DESCRIPTION π¦
this program is part of Netpbm(1) β you know, the family. π
it generates a graymap of whatever size you specified, containing a black-to-white ramp. and why do we care? because these ramps are useful for multiplying with other images, using pamarith. it's giving gradient-mask main character energy.
now here's the tea you actually need to internalize: the ramp is linear in brightness, not intensity. i.e. the gamma-corrected sample values in the PGM rise linearly with distance from the corner of the image. so if what you want is a ramp that's linear in light intensity, you're gonna run it through pnmgamma with pgmramp. don't skip that step, bestie, it changes the whole look π
the options let you choose the shape of the ramp (left to right, inside out, etc.). and if you want even more shapes? pamflip has your back. for example, -lr gives you a left to right ramp, and
pgmramp -lr 100 100 | pamflip -lr
gives you a right to left ramp. chef's kiss, no notes. β¨
also, if your goal is to generate a simple ramp of all the values from 0 to maxval and not necessarily a graphic image, use pamseq(1) instead β that's the one you want for that job.
and side note: ppmrainbow does something similar to what pgmramp does, but for color β the image fades between two colors of your choice. different assignment but same energy πΈ
π OPTIONS π
on top of the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pgmramp recognizes the following command line options:
π¨ you must specify exactly one of the ramp type options. exactly one. not zero, not two. pick your fighter.
-lrβ a left to right ramp. black on the left; white on the right.-tbβ a top to bottom ramp. black on top; white on the bottom.-rectangleβ an outside-in rectangular ramp. black around the edges, white in the center.-ellipseβ an outside-in elliptical ramp. black around the edge, white in the center.-diagonalβ a ramp from the top left corner diagonally down to the bottom right. black at the top left; white at the bottom right.- this option was new in Netpbm 10.66 (March 2014). a slightly newer icon π«Ά
-maxval=maxvalβ the maxval for the generated image. default is 255.- this option was new in Netpbm 10.1 (June 2002). before that, the maxval is always 255. so like, respect the elders, but this one's relatively fresh π
π₯ SEE ALSO π₯
pamflip(1), pamarith(1), pnmgamma(1), pamseq(1), ppmrainbow(1), pamgradient(1), pgm(1)
the whole friendship circle, truly π
π AUTHOR π
Copyright (C) 1989 by Jef Poskanzer.
give it up for the legend, respectfully π
π DOCUMENT SOURCE π
this manual page was generated by the Netpbm tool 'makeman' from HTML source. the master documentation is at
http://netpbm.sourceforge.net/doc/pgmramp.html
and that's the whole page, bestie π it's from the netpbm documentation, dated 15 February 2014, and it goes by Pgmramp User Manual(1). go make some ramps, you're gonna slay β¨π¦π
π¦ where this page comes from
- debian bookworm: netpbm 2:11.01.00-2 Β· MIT
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms