pnmtopalm - convert a portable anymap into a Palm pixmap


SYNOPSIS

       pnmtopalm  [-verbose] [-depth N] [-maxdepth N] [-colormap]
       [-transparent color]  [-offset]  [  (  -rle-compression  |
       -scanline-compression ) ] [pnmfile]


DESCRIPTION

       Reads  a  portable pixmap as input, from stdin or pnmfile.
       Produces a Palm pixmap as output.

       Palm pixmap files are either greyscale files 1,  2,  or  4
       bits  wide,  or color files 8 bits wide, so pnmtopalm will
       automatically scale colors to have an appropriate  maxval,
       unless  a  depth  or  max  depth  is explicitly specified.
       Input files must have an appropriate  number  and  set  of
       colors  for  the  selected output constraints.  This often
       means that ppmquant should be used on the anymap before it
       is  passed  to pnmtopalm.  Several colormap files are pro­
       vided to be used with ppmquant; they are palmgray2.map  (4
       shades of gray for a depth of 2), palmgray4.map (16 shades
       of gray for a depth of 4), and palmcolor8.map (232  colors
       in default Palm colormap).


OPTIONS

       -verbose
              Display the format of the output file.

       -depth N
              Produce  a  file of depth N, where N must be either
              1, 2, 4, or 8.  Any depth greater than 1 will  pro­
              duce  a version 1 or 2 bitmap.  Because the default
              Palm 8-bit colormap is not grayscale, if the  input
              is  a  grayscale  or  monochrome pixmap, the output
              will never be more than 4 bits deep, regardless  of
              the specified depth.

       -maxdepth N
              Produce  a  file  of minimal depth, but in any case
              less than N bits wide.

       -offset
              Fill in  the  nextDepthOffset  field  in  the  file
              header,  to  provide for multiple renditions of the
              pixmap in the same file.

       -colormap
              Build a custom colormap and include it in the  out­
              put  file.   This  is  not recommended by Palm, for
              efficiency reasons.  Otherwise,  the  default  Palm
              colormap is used for color output.

              Marks  one  particular  color as fully transparent.
              The format to specify the color is either (when for
              example orange) "1.0,0.5,0.0", where the values are
              floats between zero and one,  or  with  the  syntax
              "#RGB", "#RRGGBB" or "#RRRRGGGGBBBB" where R, G and
              B are hexadecimal numbers.   This  also  makes  the
              output  bitmap a version 2 bitmap.  Transparency is
              only supported for Palm OS 3.5 and higher.

       -rle-compression
              Specifies that the output Palm bitmap will use  the
              Palm  RLE compression scheme, and will be a version
              2 bitmap.  RLE compression is only  supported  with
              Palm OS 3.5 and higher.

       -scanline-compression
              Specifies  that the output Palm bitmap will use the
              Palm scanline compression scheme,  and  will  be  a
              version  2  bitmap.   Scanline  compression is only
              supported for Palm OS 2.0 and higher.


SEE ALSO

       palmtopnm(1), ppmquant(1), pnm(5)


NOTES

       There is currently no support for 16-bit  colors  used  in
       the  Handspring  Visor series.  This should be added after
       Palm OS 4.0 is released.

       Palm pixmaps may contains multiple renditions of the  same
       pixmap,  in different depths.  To construct an N-multiple-
       rendition Palm pixmap with pnmtopalm, first construct ren­
       ditions  1 through N-1 using the -offset switch, then con­
       struct the Nth pixmap without the  -offset  switch.   Then
       concatenate the individual renditions together in a single
       file using cat command.


AUTHORS

       This program was originally written as ppmtoTbmp.c, by Ian
       Goldberg and George Caswell.  It was completely re-written
       by Bill Janssen to add support for color, compression, and
       transparency.
       Copyright  1995-2000  by Ian Goldberg, George Caswell, and
       Bill Janssen.


Man(1) output converted with man2html