|
To create a simple ramp of the values 0..255, for input to various matrix
calculations, try
pamseq 1 255
(Before pamseq existed, pgmramp was often pressed into service
for this).
To create a PPM color map of all the possible colors representable with a
maxval of 5, do
pamseq 3 5 -tupletype=RGB | pamtopnm
Again, with a modern program based on the Netpbm library, you don't need
the pamtopnm because a PAM RGB image is equivalent to a PPM image.
You can use such a color map with
pnmremap(1)toquantizethecolorsinan
image. With the maxval of 5 given in the example, you get a color map
of the set of "web safe" colors as defined by Netscape. Most web
browsers guarantee that they can produce at least these 216 colors
(215 plus black).
|