summary refs log tree commit diff
path: root/pamseq.html
blob: 8f4bc7cdda000e486d1acf2215e9abfb56f38e7c (plain) (blame)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Pamseq User Manual</title></head>
<body>
<h1>pamseq</h1>
<br>
Updated: 08 May 2002
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>

pamseq - generate PAM image of all possible tuple values, in sequence

<h2 id="synopsis">SYNOPSIS</h2>

<b>pamseq</b>
[<b>-tupletype=</b><i>tupletype</i>]
<i>depth</i>
<i>maxval</i>

<p>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.

<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>pamseq</b> generates a PAM image of a specified depth and specified
maxval that consists of a single row.  The row consists of one tuple of
every possible value, in order.

<p>For a depth of one, the order is simple: From 0 to maxval, going from
left to right.  For higher depths, the highest numbered plane goes from
0 to maxval (going left to right) while all the other planes have value 0.
Then the sequence repeats except with the next highest plane set to a value
of 1, then 2, etc.

<h2 id="options">OPTIONS</h2>

<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>pamseq</b> recognizes the following
command line option:

<dl compact>
<dt><b>-tupletype</b>
<dd>
This is the value of the "tuple_type" attribute of the created PAM image.
It can be any string up to 255 characters.
</dl>

<h2 id="usage">USAGE</h2>

<p>To create a simple ramp of the values 0..255, for input to various matrix
calculations, try
<pre>
<kbd>
  pamseq 1 255 
</kbd>
</pre>
(Before <b>pamseq</b> existed, <b>pgmramp</b> was often pressed into service
for this).

<p>To create a PPM color map of all the possible colors representable with a
maxval of 5, do
<pre>
<kbd>
  pamseq 3 5 -tupletype=RGB | pamtopnm
</kbd>
</pre>

Again, with a modern program based on the Netpbm library, you don't need
the <b>pamtopnm</b> because a PAM RGB image is equivalent to a PPM image.

<p>You can use such a color map with <b><a
href="pnmremap.html">pnmremap</a></b> 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).

<h2 id="seealso">SEE ALSO</h2>

<b><a href="pnmremap.html">pnmremap</a></b>,
<b><a href="pamtopnm.html">pamtopnm</a></b>,
<b><a href="pam.html">pam</a></b>

<h2 id="history">HISTORY</h2>

<b>pamseq</b> was added to Netpbm in June 2002.

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#usage">USAGE</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#history">HISTORY</a>
</ul>
</body>
</html>