PAMSEQ(1)

πŸ’– pamseq β€” Pamseq User Manual πŸ’–

okay bestie, this is a General Commands Manual page, and it's literally all about pamseq, a Netpbm girly. let's get into it πŸŽ€

✨ NAME ✨

pamseq β€” generate a PAM image of a numerical sequence of tuple values 🌸


🌈 SYNOPSIS 🌈

pamseq [-tupletype=tupletype] depth maxval [-min=n,n,...]
[-max=n,n,...] [-step=n,n,...]

not me about to explain the little rules of option syntax, because they're important, iykyk:

  • all options can be abbreviated to their shortest unique prefix. no cap 🫢
  • you may use two hyphens instead of one to designate an option.
  • you may use either white space or an equals sign between an option name and its value.

✨ DESCRIPTION ✨

so this program is part of Netpbm(1). πŸ’…

pamseq generates a PAM image of a specified depth and specified maxval that consists of a single row. the row consists of tuples containing sample values in a numerical sequence. it's giving matrix, it's giving ramp, it's giving organized chaos 😭

for example

pamseq 1 4

generates a 5 pixel wide image of 1 row with depth 1 tuples containing these samples, in order from left to right:

0 1 2 3 4

the following example uses depth 2:

pamseq 2 2

the resulting image is a 9 pixel wide image of 1 row with depth 2 containing these samples, in order from left to right;

(0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) 2,2)

you can choose the starting and ending sample values and the step for each plane β€” here's an example of that:

pamseq 1 255 -min=4 -max=8 -step=2

this generates

4 6 8

in two dimensions:

pamseq 2 255 -min=0,4 -max=2,8 -step=1,2

(0,4) (0,6) (0,8) (1,4) (1,6) (1,8) (2,4) (2,6) (2,8)

pamseq varies first the highest numbered plane, then the next lower numbered plane, etc. within each plane, the program varies from low sample value to high. πŸ¦‹


πŸŽ€ OPTIONS πŸŽ€

in addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pamseq recognizes the following command line options:

  • -tupletype β€” this is the value of the "tuple_type" attribute of the created PAM image. it can be any string up to 255 characters. iconic. πŸ‘‘
  • -min=n,n,... β€” this gives the starting value for the sequence in each plane. the number of comma-separated numbers must be equal to the number of planes in the image (its depth). each number must be a whole number no greater than the maxval of the image. the first number is for Plane 0, the second for Plane 1, etc.

the default is 0 in every plane.

this option was new in Netpbm 10.99 (June 2022). ⭐

  • -max=n,n,... β€” this is analogous to -min, giving the stopping value for the sequence. the sequence will have no value higher than this.

each value must be at least as great as the corresponding -min value.

the default is the maxval in every plane.

this option was new in Netpbm 10.99 (June 2022). ⭐

  • -step=n,n,... β€” this is analogous to -min, giving the step value for the sequence (difference between two consecutive numbers).

each value must be positive and no greater than the maxval.

where the starting (-min) and stopping (-max) values are the same, the step value has no effect, but still must be valid. yeah bestie it's just sitting there being valid for no reason 😭

the default is 1 in every plane.

this option was new in Netpbm 10.99 (June 2022). ⭐


πŸ’œ USAGE πŸ’œ

to create a simple ramp of the values 0..255, for input to various matrix calculations, try

pamseq 1 255

(before pamseq existed, pgmramp was often pressed into service for this). the lore fr fr πŸ“

to create a PPM color map of all the possible colors representable with a maxval of 5, do

pamseq 3 5 -tupletype=RGB | pamtopnm

again, with a modern program based on the Netpbm library, you don't need the pamtopnm because a PAM RGB image is equivalent to a PPM image. saved you a pipe, you're welcome πŸ’…

you can use such a color map with pnmremap(1) to quantize the colors in an image. with the maxval of 5 given in the example, you get a color map of the set of "web safe" colors as defined by Netscape. most web browsers guarantee that they can produce at least these 216 colors (215 plus black). 🌈

pamrestack can often produce a useful two-dimensional image from pamseq's single row.

pamseq 2 255 -min=0,4 -max=2,8 -step=1,2 | pamrestack -width=3

(0,4) (0,6) (0,8)
(1,4) (1,6) (1,8)
(2,4) (2,6) (2,8)

🌸 SEE ALSO 🌸

pnmremap(1), pamtopnm(1), pamrestack(1), pam(1)


πŸ¦‹ HISTORY πŸ¦‹

pamseq was added to Netpbm in June 2002. vintage, honestly. πŸ‘‘


🧚 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/pamseq.html

okay that's the whole thing bestie, you ate that 🫢 this was the pamseq user manual, netpbm documentation, dated 4 August 2024. go generate some sequences, periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from