1Pamunlookup User Manual(0) Pamunlookup User Manual(0)
2
3
4
6 pamunlookup - inverse of pamlookup
7
8
10 pamunlookup -lookupfile=lookupfile inputfile
11
12 All options can be abbreviated to their shortest unique prefix. You
13 may use two hyphens instead of one. You may separate an option name
14 and its value with white space instead of an equals sign.
15
16
18 This program is part of Netpbm(1).
19
20 pamunlookup is best described as the inverse of pamlookup (without
21 -byplane). For example, the following normally yields output identical
22 the input:
23
24 $ cat input.ppm | \
25 pamunlookup -lookupfile=map.pam | \
26 pamlookup -lookupfile=map.pam \
27 > output.ppm
28
29 Specifically, pamunlookup takes an input image and produces an output
30 image of the same width and height in which each tuple is a single num‐
31 ber. That number is the index in a given lookup table of the tuple
32 value that is in the same position in the input image.
33
34 You specify the lookup table the same way as for pamlookup
35 ⟨pamlookup.html#lookupimage⟩ .
36
37 Where a tuple in the input image is not in the lookup table, the number
38 pamunlookup places in the output index image is one greater than the
39 highest index in the lookup table. Accordingly, the maxval of the out‐
40 put index image is the size of the lookup table.
41
42
43
44 Example
45 Here is an example of pamunlookup's function.
46
47 Consider an input image consisting of a 3x2 PPM as follows:
48
49
50 red yellow red
51 beige beige beige
52
53 and a lookup table consisting of a 3x1 PPM image as follows:
54
55
56 red yellow beige
57
58 The lookup table above says Index 0 corresponds to the color red, Index
59 1 corresponds to yellow, and Index 2 corresponds to beige. The output
60 of pamunlookup is the following index image:
61
62
63 0 1 0
64 2 2 2
65
66
67 Miscellaneous
68 The inputfile argument identifies the file containing the index PAM or
69 PNM image. - means Standard Input. It won't work if both the input
70 image file and lookup table file are Standard Input.
71
72 The output index image goes to Standard Output.
73
74
75
77 In addition to the options common to all programs based on libnetpbm
78 (most notably -quiet, see
79 Common Options ⟨index.html#commonoptions⟩ ), pamunlookup recognizes
80 the following command line option:
81
82
83
84 -lookupfile=lookupfile
85 lookupfile names the file that contains the PAM or PNM image
86 that is the lookup table. This option is mandatory.
87
88
89
90
91
93 pamlookup(1), ppmchange(1), pnmcolormap(1), pnm(1), pam(1)
94
95
96
98 pamunlookup was new in Netpbm 10.72 (September 2015).
99
101 This manual page was generated by the Netpbm tool 'makeman' from HTML
102 source. The master documentation is at
103
104 http://netpbm.sourceforge.net/doc/pamunlookup.html
105
106netpbm documentation 09 August 2015 Pamunlookup User Manual(0)