summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man1/pamseq.1
blob: 660ff6f3de05901dec50d1a2c29cddc4747b6849 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it!  If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Pamseq User Manual" 1 "30 April 2022" "netpbm documentation"


.SH NAME

pamseq - generate PAM image of a numerical sequence of tuple values

.UN synopsis
.SH SYNOPSIS

\fBpamseq\fP
[\fB-tupletype=\fP\fItupletype\fP]
\fIdepth\fP
\fImaxval\fP
[\fB-min=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP...]
[\fB-max=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP...]
[\fB-step=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP...]
.PP
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.

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBpamseq\fP 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.
.PP
For example

.nf
\f(CW
    pamseq 1 4
\fP

.fi

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

.nf
    0 1 2 3 4

.fi

  The following example uses depth 2:

.nf
\f(CW
    pamseq 2 2
\fP

.fi

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

.nf
    (0,0) (0,1) (0,2) (1,0) (1,1) (1,2) (2,0) (2,1) 2,2)

.fi
.PP
  You can choose the starting and ending sample values and the step for each
  plane:  Here is an example of that:

.nf
\f(CW
    pamseq 1 255 -min=4 -max=8 -step=2
\fP

.fi

This generates

.nf
    4 6 8

.fi

In two dimensions:

.nf
\f(CW
    pamseq 2 255 -min=0,4 -max=2,8 -step=1,2
\fP

.fi

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

.fi
.PP
  \fBpamseq\fP 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.

  
.UN options
.SH OPTIONS
.PP
In addition to the options common to all programs based on libnetpbm
(most notably \fB-quiet\fP, see 
.UR index.html#commonoptions
 Common Options
.UE
\&), \fBpamseq\fP recognizes the following
command line options:


.TP
\fB-tupletype\fP
This is the value of the "tuple_type" attribute of the created PAM image.
It can be any string up to 255 characters.

.TP
\fB-min=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP...
  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.
.sp
The default is 0 in every plane.
.sp
This option was new in Netpbm 10.99 (June 2022).

.TP
\fB-max=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP...
.sp
This is analogous to \fB-min\fP, giving the ending value for the
    sequence.
.sp
Each value must be at least as great as the corresponding \fB-min\fP
    value.
.sp
The default is the maxval in every plane.
.sp
This option was new in Netpbm 10.99 (June 2022).

.TP
\fB-step=\fP\fIn\fP\fB,\fP\fIn\fP\fB,\fP...
.sp
This is analogous to \fB-min\fP, giving the step value for the
    sequence (difference between two consecutive numbers).
.sp
Each value must be positive and no greater than the maxval.
.sp
The default is 1.
.sp
This option was new in Netpbm 10.99 (June 2022).



.UN usage
.SH USAGE
.PP
To create a simple ramp of the values 0..255, for input to various matrix
calculations, try
.nf
\f(CW
  pamseq 1 255 
\fP

.fi
(Before \fBpamseq\fP existed, \fBpgmramp\fP was often pressed into service
for this).
.PP
To create a PPM color map of all the possible colors representable with a
maxval of 5, do
.nf
\f(CW
  pamseq 3 5 -tupletype=RGB | pamtopnm
\fP

.fi

Again, with a modern program based on the Netpbm library, you don't need
the \fBpamtopnm\fP because a PAM RGB image is equivalent to a PPM image.
.PP
You can use such a color map with
.BR "pnmremap" (1)\c
\& 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).
.PP
\fBpamrestack\fP can often produce a useful two-dimensional image from
\fBpamseq\fP's single row.

.nf
\f(CW
    pamseq 2 255 -min=0,4 -max=2,8 -step=1,2 | pamrestack -width=3
\fP

.fi

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

.fi
  

  
.UN seealso
.SH SEE ALSO
.BR "pnmremap" (1)\c
\&,
.BR "pamtopnm" (1)\c
\&,
.BR "pamrestack" (1)\c
\&,
.BR "pam" (1)\c
\&

.UN history
.SH HISTORY

\fBpamseq\fP was added to Netpbm in June 2002.
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source.  The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/pamseq.html
.PP