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 -by‐
21 plane). 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
30 Specifically, pamunlookup takes an input image and produces an output
31 image of the same width and height in which each tuple is a single num‐
32 ber. That number is the index in a given lookup table of the tuple
33 value that is in the same position in the input image.
34
35 You specify the lookup table the same way as for pamlookup
36 ⟨pamlookup.html#lookupimage⟩ .
37
38 Where a tuple in the input image is not in the lookup table, the number
39 pamunlookup places in the output index image is one greater than the
40 highest index in the lookup table. Accordingly, the maxval of the out‐
41 put index image is the size of the lookup table.
42
43
44
45 Example
46 Here is an example of pamunlookup's function.
47
48 Consider an input image consisting of a 3x2 PPM as follows:
49
50
51 red yellow red
52 beige beige beige
53
54 and a lookup table consisting of a 3x1 PPM image as follows:
55
56
57 red yellow beige
58
59 The lookup table above says Index 0 corresponds to the color red, Index
60 1 corresponds to yellow, and Index 2 corresponds to beige. The output
61 of pamunlookup is the following index image:
62
63
64 0 1 0
65 2 2 2
66
67
68 Miscellaneous
69 The inputfile argument identifies the file containing the index PAM or
70 PNM image. - means Standard Input. It won't work if both the input
71 image file and lookup table file are Standard Input.
72
73 The output index image goes to Standard Output.
74
75
76
78 In addition to the options common to all programs based on libnetpbm
79 (most notably -quiet, see
80 Common Options ⟨index.html#commonoptions⟩ ), pamunlookup recognizes
81 the following command line option:
82
83
84
85 -lookupfile=lookupfile
86 lookupfile names the file that contains the PAM or PNM image
87 that is the lookup table. This option is mandatory.
88
89
90
91
92
94 pamlookup(1), ppmchange(1), pnmcolormap(1), pnm(1), pam(1)
95
96
97
99 pamunlookup was new in Netpbm 10.72 (September 2015).
100
102 This manual page was generated by the Netpbm tool 'makeman' from HTML
103 source. The master documentation is at
104
105 http://netpbm.sourceforge.net/doc/pamunlookup.html
106
107netpbm documentation 09 August 2015 Pamunlookup User Manual(0)