Computer Science


pgmtoppm(1)                                           pgmtoppm(1)

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 multi-
       plying  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 spec-
       ified 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 hex-
              adecimal  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.

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

AUTHOR
       Copyright (C) 1991 by Jef Poskanzer.

                         11 January 1991                        1

Back to the index


Apply now!


Handbook

Postgraduate study options

Computer Science Blog



Please give us your feedback or ask us a question

This message is...


My feedback or question is...


My email address is...

(Only if you need a reply)

A to Z Directory | Site map | Accessibility | Copyright | Privacy | Disclaimer | Feedback on this page