about summary refs log tree commit diff
path: root/pamseq.html
blob: 685f1e5f97df04c76b3f6148a63cf191ace88e8f (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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><title>Pamseq User Manual</title></HEAD>
<BODY>
<H1>pamseq</H1>
<BR>
Updated: 8 May 2002
<BR>
<A HREF="#index">Table Of Contents</A>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

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

<H2>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>

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