PGMTOPPM



		

NAME

      pgmtoppm - colorize a portable graymap into a portable pixmap

SYNOPSIS

      pgmtoppm colorspec [pgmfile]
      pgmtoppm colorspec1-colorspec2 [pgmfile]
      pgmtoppm -map mapfile [pgmfile]

DESCRIPTION

      Reads a portable graymap as input.  Colorizes it by multiplying the
      the gray values by specified color or colors, and produces a portable
      pixmap as output.
      If only one color is specified, black in the pgm file stays black and
      white in the pgm file turns into the specified color in the ppm file.
      If two colors (separated by a dash) are specified, then black gets
      mapped to the first color and white gets mapped to the second.
      The color can be specified in five ways:
      o    A name, assuming that a pointer to an X11-style color names file
           was compiled in.
      o    An X11-style hexadecimal specifier: rgb:r/g/b, where r g and b
           are each 1- to 4-digit hexadecimal numbers.
      o    An X11-style decimal specifier: rgbi:r/g/b, where r g and b are
           floating point numbers between 0 and 1.
      o    For backwards compatibility, an old-X11-style hexadecimal number:
           #rgb, #rrggbb, #rrrgggbbb, or #rrrrggggbbbb.
      o    For backwards compatibility, a triplet of numbers separated by
           commas: r,g,b, where r g and b are floating point numbers between
           0 and 1.  (This style was added before MIT came up with the
           similar rgbi style.)
      Also, the -map flag lets you specify an entire colormap to be used.
      The mapfile is just a ppm file; it can be any shape, all that matters
      is the colors in it and their order.  In this case, black gets mapped
      into the first color in the map file, and white gets mapped to the
      last.

DEMONSTRATION

      Let a.pgm be a portable greymap.
      The following command will colorize it in blue:
	ppmmerge pgmtoppm rgb:00/00/FF a.pgm > a.ppm

BEFORE

AFTER


		

SEE ALSO

      rgb3toppm(1), ppmtopgm(1), ppmtorgb3(1), ppm(5), pgm(5)

AUTHOR

      Copyright (C) 1991 by Jef Poskanzer.