Section: User Commands (1)
Updated: 7 December 2000
pnmtopalm - convert a portable anymap into a Palm pixmap
pnmtopalm [-verbose] [-depth N] [-maxdepth N] [-colormap] [-transparent color] [-offset]
Palm pixmap files are either greyscale files 1, 2, or 4 bits wide, or color files 8 bits wide, so pnmtopalm automatically scales colors to have an appropriate maxval, unless you specify a depth or max depth. Input files must have an appropriate number and set of colors for the selected output constraints. This often means that you should run the PNM image through ppmquant before you pass it to pnmtopalm. Netpbm comes with several colormap files you can use with ppmquant for this purpose. 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).
An additional compression format, packbits, was added with PalmOS 4.0. This package should be updated to be able to generate that.
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 renditions 1 through N-1 using the -offset option, then construct the Nth pixmap without the -offset option. Then concatenate the individual renditions together in a single file using cat.
This program was originally written as ppmtoTbmp.c, by Ian Goldberg and George Caswell. It was completely re-written by Bill Janssen to add color, compression, and transparency function.
Copyright 1995-2001 by Ian Goldberg, George Caswell, and Bill Janssen.
Tutoriais de Tecnologia Web