PAMUNLOOKUP(1)
π pamunlookup β the inverse of pamlookup π«
hiii bestie π welcome to the Pamunlookup User Manual (it lives in the General Commands Manual section, very demure, very mindful). this page is your whole guide to pamunlookup, and ngl it's a short one but she's cute.
β¨ NAME β¨
pamunlookup β literally just the inverse of pamlookup. that's the whole name. no notes.
πΈ SYNOPSIS πΈ
pamunlookup -lookupfile=lookupfile inputfile
okay so quick housekeeping, all the options? you can abbreviate them to their shortest unique prefix π . and you can use two hyphens instead of one if you're feeling extra. you can also split an option name and its value with white space instead of an equals sign. flexible queen behavior.
π¦ DESCRIPTION π¦
so this program is part of Netpbm(1) π«Ά.
pamunlookup is best described as the inverse of pamlookup β and specifically, without -byplane, mmkay? for example, this here normally gives you output that's identical to the input:
$ cat input.ppm | \
pamunlookup -lookupfile=map.pam | \
pamlookup -lookupfile=map.pam \
> output.ppm
like, round trip, we love to see it β¨.
here's the actual tea though: pamunlookup takes an input image and produces an output image of the same width and height, and in that output, every single tuple is just a single number π’. and that number? it's the index in a given lookup table of the tuple value that's sitting in the same position in the input image. so basically you're going backwards, index-hunting style.
you specify the lookup table the exact same way you do for pamlookup.
now, the drama: where a tuple in the input image is not in the lookup table, the number pamunlookup drops into the output index image is one greater than the highest index in the lookup table π. consequently β and this is important β the maxval of the output index image is the size of the lookup table.
π Example π
here's a little demonstration of what pamunlookup does, because vibes are better with visuals.
imagine an input image that's a 3x2 PPM looking like this:
red yellow red
beige beige beige
and a lookup table that's a 3x1 PPM image like this:
red yellow beige
so that lookup table is telling us: Index 0 corresponds to the color red, Index 1 corresponds to yellow, and Index 2 corresponds to beige. so when pamunlookup does its thing, the output is this index image:
0 1 0
2 2 2
periodt. π
π Miscellaneous π
the inputfile argument identifies the file containing the index PAM or PNM image. - means Standard Input. but heads up β it won't work if both the input image file and the lookup table file are Standard Input π. pick a lane, bestie.
the output index image goes to Standard Output. that's her home.
π OPTIONS π
on top of the options that are common to all programs based on libnetpbm (and most notably -quiet, see Common Options), pamunlookup recognizes this one 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, so like, you don't get to skip it, okay? π
π SEE ALSO π
pamlookup(1), ppmchange(1), pnmcolormap(1), pnm(1), pam(1)
go read those too, they're the friend group π«Ά
π HISTORY π
pamunlookup was new in Netpbm 10.72 (September 2015). so she's a 2015 baby, and we respect the era π.
π§ 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
okay and that's the whole page!! this was netpbm documentation, dated 09 August 2015, and you just read the Pamunlookup User Manual πβ¨ thanks for sticking around bestie, now go invert some lookup tables. slay ππ¦π
π¦ where this page comes from
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms