man > pamunlookup(1)

Pamunlookup User Manual(1)             General Commands Manual            Pamunlookup User Manual(1)

NAME
       pamunlookup - inverse of pamlookup


SYNOPSIS
       pamunlookup -lookupfile=lookupfile inputfile

       All  options can be abbreviated to their shortest unique prefix.  You may use two hyphens in‐
       stead of one.  You may separate an option name and its value with white space instead  of  an
       equals sign.


DESCRIPTION
       This program is part of Netpbm(1).

       pamunlookup  is  best described as the inverse of pamlookup (without -byplane).  For example,
       the following normally yields output identical to 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 ]8;;pamlookup.html#lookupimage\pamlookup]8;;\ .

       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.  Accord‐
       ingly, the maxval of the output index image is the size of the lookup table.



   Example
       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

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

       red   yellow   beige

       The lookup table above says Index 0 corresponds to the color red, Index 1 corresponds to yel‐
       low, and Index 2 corresponds to beige.  The output of pamunlookup is the following index  im‐
       age:

       0   1   0
       2   2   2


   Miscellaneous
       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  Stan‐
       dard Input.

       The output index image goes to Standard Output.



OPTIONS
       In  addition  to  the options common to all programs based on libnetpbm (most notably -quiet,
       see ]8;;index.html#commonoptions\ Common Options]8;;\ ), pamunlookup recognizes the following command line option:



       -lookupfile=lookupfile
              lookupfile names the file that contains the PAM or PNM image that is the lookup table.
              This option is mandatory.





SEE ALSO
       pamlookup(1), ppmchange(1), pnmcolormap(1), pnm(1), pam(1)



HISTORY
       pamunlookup was new in Netpbm 10.72 (September 2015).

DOCUMENT SOURCE
       This manual page was generated by the Netpbm tool 'makeman' from  HTML  source.   The  master
       documentation is at

              http://netpbm.sourceforge.net/doc/pamunlookup.html

netpbm documentation                       09 August 2015                 Pamunlookup User Manual(1)
pamunlookup(1)
NAME SYNOPSIS DESCRIPTION
Example Miscellaneous
OPTIONS
-lookupfile=lookupfile
SEE ALSO HISTORY DOCUMENT SOURCE

Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-11 20:03 @216.73.217.145
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^