| 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 "Pamunlookup User Manual" 1 "09 August 2015" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
pamunlookup - inverse of pamlookup |
| 10 |
|
| 11 |
.UN synopsis |
| 12 |
.SH SYNOPSIS |
| 13 |
|
| 14 |
\fBpamunlookup\fP |
| 15 |
\fB-lookupfile=\fP\fIlookupfile\fP |
| 16 |
\fIinputfile\fP |
| 17 |
.PP |
| 18 |
All options can be abbreviated to their shortest unique prefix. |
| 19 |
You may use two hyphens instead of one. You may separate an option |
| 20 |
name and its value with white space instead of an equals sign. |
| 21 |
|
| 22 |
.UN description |
| 23 |
.SH DESCRIPTION |
| 24 |
.PP |
| 25 |
This program is part of |
| 26 |
.BR "Netpbm" (1)\c |
| 27 |
\&. |
| 28 |
.PP |
| 29 |
\fBpamunlookup\fP is best described as the inverse of \fBpamlookup\fP |
| 30 |
(without \fB-byplane\fP). For example, the following normally yields output |
| 31 |
identical to the input: |
| 32 |
|
| 33 |
.nf |
| 34 |
\f(CW |
| 35 |
$ cat input.ppm | \e |
| 36 |
pamunlookup -lookupfile=map.pam | \e |
| 37 |
pamlookup -lookupfile=map.pam \e |
| 38 |
> output.ppm |
| 39 |
\fP |
| 40 |
|
| 41 |
.fi |
| 42 |
.PP |
| 43 |
Specifically, \fBpamunlookup\fP takes an input image and produces an |
| 44 |
output image of the same width and height in which each tuple is a single |
| 45 |
number. That number is the index in a given lookup table of the tuple value |
| 46 |
that is in the same position in the input image. |
| 47 |
.PP |
| 48 |
You specify the lookup table the same way as for |
| 49 |
.UR pamlookup.html#lookupimage |
| 50 |
\fBpamlookup\fP |
| 51 |
.UE |
| 52 |
\&. |
| 53 |
.PP |
| 54 |
Where a tuple in the input image is not in the lookup table, the |
| 55 |
number \fBpamunlookup\fP places in the output index image is one greater than |
| 56 |
the highest index in the lookup table. Accordingly, the maxval of the output |
| 57 |
index image is the size of the lookup table. |
| 58 |
|
| 59 |
|
| 60 |
.UN example |
| 61 |
.SS Example |
| 62 |
.PP |
| 63 |
Here is an example of \fBpamunlookup\fP's function. |
| 64 |
.PP |
| 65 |
Consider an input image consisting of a 3x2 PPM as follows: |
| 66 |
|
| 67 |
.TS |
| 68 |
l l l. |
| 69 |
red yellow red |
| 70 |
beige beige beige |
| 71 |
.TE |
| 72 |
|
| 73 |
and a lookup table consisting of a 3x1 PPM image as follows: |
| 74 |
|
| 75 |
.TS |
| 76 |
l l l. |
| 77 |
red yellow beige |
| 78 |
.TE |
| 79 |
|
| 80 |
The lookup table above says Index 0 corresponds to the color red, |
| 81 |
Index 1 corresponds to yellow, and Index 2 corresponds to beige. The output |
| 82 |
of \fBpamunlookup\fP is the following index image: |
| 83 |
|
| 84 |
.TS |
| 85 |
l l l. |
| 86 |
0 1 0 |
| 87 |
2 2 2 |
| 88 |
.TE |
| 89 |
|
| 90 |
.UN misc |
| 91 |
.SS Miscellaneous |
| 92 |
.PP |
| 93 |
The \fIinputfile\fP argument identifies the file containing the index PAM |
| 94 |
or PNM image. \fB-\fP means Standard Input. It won't work if both the input |
| 95 |
image file and lookup table file are Standard Input. |
| 96 |
|
| 97 |
The output index image goes to Standard Output. |
| 98 |
|
| 99 |
|
| 100 |
.UN options |
| 101 |
.SH OPTIONS |
| 102 |
.PP |
| 103 |
In addition to the options common to all programs based on libnetpbm |
| 104 |
(most notably \fB-quiet\fP, see |
| 105 |
.UR index.html#commonoptions |
| 106 |
Common Options |
| 107 |
.UE |
| 108 |
\&), \fBpamunlookup\fP recognizes the following |
| 109 |
command line option: |
| 110 |
|
| 111 |
|
| 112 |
.TP |
| 113 |
\fB-lookupfile=\fP\fIlookupfile\fP |
| 114 |
\fIlookupfile\fP names the file that contains the PAM or PNM |
| 115 |
image that is the lookup table. This option is mandatory. |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
.UN seealso |
| 121 |
.SH SEE ALSO |
| 122 |
.BR "pamlookup" (1)\c |
| 123 |
\&, |
| 124 |
.BR "ppmchange" (1)\c |
| 125 |
\&, |
| 126 |
.BR "pnmcolormap" (1)\c |
| 127 |
\&, |
| 128 |
.BR "pnm" (1)\c |
| 129 |
\&, |
| 130 |
.BR "pam" (1)\c |
| 131 |
\& |
| 132 |
|
| 133 |
|
| 134 |
.UN history |
| 135 |
.SH HISTORY |
| 136 |
.PP |
| 137 |
\fBpamunlookup\fP was new in Netpbm 10.72 (September 2015). |
| 138 |
.SH DOCUMENT SOURCE |
| 139 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 140 |
source. The master documentation is at |
| 141 |
.IP |
| 142 |
.B http://netpbm.sourceforge.net/doc/pamunlookup.html |
| 143 |
.PP |