| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Pamseq User Manual" 1 "4 August 2024" "netpbm documentation" |
| 7 |
|
| 8 |
|
| 9 |
.SH NAME |
| 10 |
|
| 11 |
pamseq - generate PAM image of a numerical sequence of tuple values |
| 12 |
|
| 13 |
.UN synopsis |
| 14 |
.SH SYNOPSIS |
| 15 |
|
| 16 |
\fBpamseq\fP |
| 17 |
[\fB-tupletype=\fP\fItupletype\fP] |
| 18 |
\fIdepth\fP |
| 19 |
\fImaxval\fP |
| 20 |
[\fB-min=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP...] |
| 21 |
[\fB-max=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP...] |
| 22 |
[\fB-step=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP...] |
| 23 |
.PP |
| 24 |
All options can be abbreviated to their shortest unique prefix. You |
| 25 |
may use two hyphens instead of one to designate an option. You may |
| 26 |
use either white space or an equals sign between an option name and its |
| 27 |
value. |
| 28 |
|
| 29 |
.UN description |
| 30 |
.SH DESCRIPTION |
| 31 |
.PP |
| 32 |
This program is part of |
| 33 |
.BR "Netpbm" (1)\c |
| 34 |
\&. |
| 35 |
.PP |
| 36 |
\fBpamseq\fP generates a PAM image of a specified depth and specified |
| 37 |
maxval that consists of a single row. The row consists of tuples |
| 38 |
containing sample values in a numerical sequence. |
| 39 |
.PP |
| 40 |
For example |
| 41 |
|
| 42 |
.nf |
| 43 |
\f(CW |
| 44 |
pamseq 1 4 |
| 45 |
\fP |
| 46 |
|
| 47 |
.fi |
| 48 |
|
| 49 |
generates a 5 pixel wide image of 1 row with depth 1 tuples containing these |
| 50 |
samples, in order from left to right: |
| 51 |
|
| 52 |
.nf |
| 53 |
0 1 2 3 4 |
| 54 |
|
| 55 |
.fi |
| 56 |
|
| 57 |
The following example uses depth 2: |
| 58 |
|
| 59 |
.nf |
| 60 |
\f(CW |
| 61 |
pamseq 2 2 |
| 62 |
\fP |
| 63 |
|
| 64 |
.fi |
| 65 |
|
| 66 |
The resulting image is a 9 pixel wide image of 1 row with depth 2 containing |
| 67 |
these samples, in order from left to right; |
| 68 |
|
| 69 |
.nf |
| 70 |
(0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) 2,2) |
| 71 |
|
| 72 |
.fi |
| 73 |
.PP |
| 74 |
You can choose the starting and ending sample values and the step for each |
| 75 |
plane: Here is an example of that: |
| 76 |
|
| 77 |
.nf |
| 78 |
\f(CW |
| 79 |
pamseq 1 255 -min=4 -max=8 -step=2 |
| 80 |
\fP |
| 81 |
|
| 82 |
.fi |
| 83 |
|
| 84 |
This generates |
| 85 |
|
| 86 |
.nf |
| 87 |
4 6 8 |
| 88 |
|
| 89 |
.fi |
| 90 |
|
| 91 |
In two dimensions: |
| 92 |
|
| 93 |
.nf |
| 94 |
\f(CW |
| 95 |
pamseq 2 255 -min=0,4 -max=2,8 -step=1,2 |
| 96 |
\fP |
| 97 |
|
| 98 |
.fi |
| 99 |
|
| 100 |
.nf |
| 101 |
(0,4) (0,6) (0,8) (1,4) (1,6) (1,8) (2,4) (2,6) (2,8) |
| 102 |
|
| 103 |
.fi |
| 104 |
.PP |
| 105 |
\fBpamseq\fP varies first the highest numbered plane, then the next lower |
| 106 |
numbered plane, etc. Within each plane, the program varies from low sample |
| 107 |
value to high. |
| 108 |
|
| 109 |
|
| 110 |
.UN options |
| 111 |
.SH OPTIONS |
| 112 |
.PP |
| 113 |
In addition to the options common to all programs based on libnetpbm |
| 114 |
(most notably \fB-quiet\fP, see |
| 115 |
.UR index.html#commonoptions |
| 116 |
Common Options |
| 117 |
.UE |
| 118 |
\&), \fBpamseq\fP recognizes the following |
| 119 |
command line options: |
| 120 |
|
| 121 |
|
| 122 |
.TP |
| 123 |
\fB-tupletype\fP |
| 124 |
This is the value of the "tuple_type" attribute of the created PAM image. |
| 125 |
It can be any string up to 255 characters. |
| 126 |
|
| 127 |
.TP |
| 128 |
\fB-min=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP... |
| 129 |
This gives the starting value for the sequence in each plane. The number |
| 130 |
of comma-separated numbers must be equal to the number of planes in the |
| 131 |
image (its depth). Each number must be a whole number no greater than |
| 132 |
the maxval of the image. The first number is for Plane 0, the second for |
| 133 |
Plane 1, etc. |
| 134 |
.sp |
| 135 |
The default is 0 in every plane. |
| 136 |
.sp |
| 137 |
This option was new in Netpbm 10.99 (June 2022). |
| 138 |
|
| 139 |
.TP |
| 140 |
\fB-max=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP... |
| 141 |
.sp |
| 142 |
This is analogous to \fB-min\fP, giving the stopping value for the |
| 143 |
sequence. The sequence will have no value higher than this. |
| 144 |
.sp |
| 145 |
Each value must be at least as great as the corresponding \fB-min\fP |
| 146 |
value. |
| 147 |
.sp |
| 148 |
The default is the maxval in every plane. |
| 149 |
.sp |
| 150 |
This option was new in Netpbm 10.99 (June 2022). |
| 151 |
|
| 152 |
.TP |
| 153 |
\fB-step=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP... |
| 154 |
.sp |
| 155 |
This is analogous to \fB-min\fP, giving the step value for the |
| 156 |
sequence (difference between two consecutive numbers). |
| 157 |
.sp |
| 158 |
Each value must be positive and no greater than the maxval. |
| 159 |
.sp |
| 160 |
Where the starting (\fB-min\fP) and stopping (\fB-max\fP) values are |
| 161 |
the same, the step value has no effect, but still must be valid. |
| 162 |
.sp |
| 163 |
The default is 1 in every plane. |
| 164 |
.sp |
| 165 |
This option was new in Netpbm 10.99 (June 2022). |
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
.UN usage |
| 170 |
.SH USAGE |
| 171 |
.PP |
| 172 |
To create a simple ramp of the values 0..255, for input to various matrix |
| 173 |
calculations, try |
| 174 |
.nf |
| 175 |
\f(CW |
| 176 |
pamseq 1 255 |
| 177 |
\fP |
| 178 |
|
| 179 |
.fi |
| 180 |
(Before \fBpamseq\fP existed, \fBpgmramp\fP was often pressed into service |
| 181 |
for this). |
| 182 |
.PP |
| 183 |
To create a PPM color map of all the possible colors representable with a |
| 184 |
maxval of 5, do |
| 185 |
.nf |
| 186 |
\f(CW |
| 187 |
pamseq 3 5 -tupletype=RGB | pamtopnm |
| 188 |
\fP |
| 189 |
|
| 190 |
.fi |
| 191 |
|
| 192 |
Again, with a modern program based on the Netpbm library, you don't need |
| 193 |
the \fBpamtopnm\fP because a PAM RGB image is equivalent to a PPM image. |
| 194 |
.PP |
| 195 |
You can use such a color map with |
| 196 |
.BR "pnmremap" (1)\c |
| 197 |
\& to quantize the colors in an |
| 198 |
image. With the maxval of 5 given in the example, you get a color map |
| 199 |
of the set of "web safe" colors as defined by Netscape. Most web |
| 200 |
browsers guarantee that they can produce at least these 216 colors |
| 201 |
(215 plus black). |
| 202 |
.PP |
| 203 |
\fBpamrestack\fP can often produce a useful two-dimensional image from |
| 204 |
\fBpamseq\fP's single row. |
| 205 |
|
| 206 |
.nf |
| 207 |
\f(CW |
| 208 |
pamseq 2 255 -min=0,4 -max=2,8 -step=1,2 | pamrestack -width=3 |
| 209 |
\fP |
| 210 |
|
| 211 |
.fi |
| 212 |
|
| 213 |
.nf |
| 214 |
(0,4) (0,6) (0,8) |
| 215 |
(1,4) (1,6) (1,8) |
| 216 |
(2,4) (2,6) (2,8) |
| 217 |
|
| 218 |
.fi |
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
.UN seealso |
| 223 |
.SH SEE ALSO |
| 224 |
.BR "pnmremap" (1)\c |
| 225 |
\&, |
| 226 |
.BR "pamtopnm" (1)\c |
| 227 |
\&, |
| 228 |
.BR "pamrestack" (1)\c |
| 229 |
\&, |
| 230 |
.BR "pam" (1)\c |
| 231 |
\& |
| 232 |
|
| 233 |
.UN history |
| 234 |
.SH HISTORY |
| 235 |
|
| 236 |
\fBpamseq\fP was added to Netpbm in June 2002. |
| 237 |
.SH DOCUMENT SOURCE |
| 238 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 239 |
source. The master documentation is at |
| 240 |
.IP |
| 241 |
.B http://netpbm.sourceforge.net/doc/pamseq.html |
| 242 |
.PP |