All options can be abbreviated to their shortest unique prefix. 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.
This program is part of Netpbm.
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.
For example
pamseq 1 4generates 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 4The following example uses depth 2:
pamseq 2 2The 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 is an example of that:
pamseq 1 255 -min=4 -max=8 -step=2This generates
4 6 8In 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.
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:
The default is 0 in every plane.
This option was new in Netpbm 10.99 (June 2022).
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).
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.
The default is 1 in every plane.
This option was new in Netpbm 10.99 (June 2022).
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).
To create a PPM color map of all the possible colors representable with a maxval of 5, do
pamseq 3 5 -tupletype=RGB | pamtopnmAgain, 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.
You can use such a color map with pnmremap 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)