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.
This program is part of Netpbm.
pamunlookup is best described as the inverse of pamlookup (without -byplane). For example, the following normally yields output identical the input:
$ cat input.ppm | \ pamunlookup -lookupfile=map.pam | \ pamlookup -lookupfile=map.pam \ > output.ppm
Specifically, pamunlookup 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.
You specify the lookup table the same way as for pamlookup.
Where a tuple in the input image is not in the lookup table, the number pamunlookup 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.
Here is an example of pamunlookup's function.
Consider an input image consisting of a 3x2 PPM as follows:
red | yellow | red |
beige | beige | beige |
red | yellow | beige |
0 | 1 | 0 |
2 | 2 | 2 |
The inputfile argument identifies the file containing the index PAM or PNM image. - 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.
pamunlookup was new in Netpbm 10.72 (September 2015).