summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-leap-15-6/man1/pamunlookup.1
blob: d17f2ae6a78a774361ff978277240921bf7dab47 (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
\
.\" 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 "Pamunlookup User Manual" 0 "9 August 2015" "netpbm documentation"

.UN name
.SH NAME
pamunlookup - inverse of pamlookup

.UN synopsis
.SH SYNOPSIS

\fBpamunlookup\fP
\fB-lookupfile=\fP\fIlookupfile\fP
\fIinputfile\fP
.PP
All options can be abbreviated to their shortest unique prefix.
You may use two hyphens instead of one.  You may separate an option
name and its value with white space instead of an equals sign.

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBpamunlookup\fP is best described as the inverse of \fBpamlookup\fP
(without \fB-byplane\fP).  For example, the following normally yields output
identical the input:

.nf
\f(CW
    $ cat input.ppm | \e
        pamunlookup -lookupfile=map.pam | \e
        pamlookup -lookupfile=map.pam \e
        > output.ppm
\fP
.fi
.PP
Specifically, \fBpamunlookup\fP takes an input image and produces an
output image of the same width and height in which each tuple is a single
number.  That number is the index in a given lookup table of the tuple value
that is in the same position in the input image.
.PP
You specify the lookup table the same way as for
.UR pamlookup.html#lookupimage
\fBpamlookup\fP
.UE
\&.
.PP
Where a tuple in the input image is not in the lookup table, the
number \fBpamunlookup\fP places in the output index image is one greater than
the highest index in the lookup table.  Accordingly, the maxval of the output
index image is the size of the lookup table.


.UN example
.SS Example
.PP
Here is an example of \fBpamunlookup\fP's function.
.PP
Consider an input image consisting of a 3x2 PPM as follows:

.TS
l l l.
red	yellow	red
beige	beige	beige
.TE

and a lookup table consisting of a 3x1 PPM image as follows:

.TS
l l l.
red	yellow	beige
.TE

The lookup table above says Index 0 corresponds to the color red,
Index 1 corresponds to yellow, and Index 2 corresponds to beige.  The output
of \fBpamunlookup\fP is the following index image:

.TS
l l l.
0	1	0
2	2	2
.TE


.UN misc
.SS Miscellaneous
.PP
The \fIinputfile\fP argument identifies the file containing the index PAM
or PNM image.  \fB-\fP means Standard Input.  It won't work if both the input
image file and lookup table file are Standard Input.

The output index image goes to Standard Output.


.UN options
.SH OPTIONS


.TP
\fB-lookupfile=\fP\fIlookupfile\fP
\fIlookupfile\fP names the file that contains the PAM or PNM
image that is the lookup table.  This option is mandatory.



     
.UN seealso
.SH SEE ALSO
.BR "pamlookup" (1)\c
\&,
.BR "ppmchange" (1)\c
\&,
.BR "pnmcolormap" (1)\c
\&,
.BR "pnm" (5)\c
\&,
.BR "pam" (5)\c
\&


.UN history
.SH HISTORY
.PP
\fBpamunlookup\fP was new in Netpbm 10.72 (September 2015).
.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/pamunlookup.html
.PP