table of contents
ppmtoxpm(1) | General Commands Manual | ppmtoxpm(1) |
NAME¶
ppmtoxpm - convert a portable pixmap into an X11 pixmapSYNOPSIS¶
ppmtoxpm [-name=xpmname] [-rgb=rgb-textfile] [-alphamask=pgmfile] [ppmfile]DESCRIPTION¶
Reads a portable pixmap as input. Produces X11 pixmap (version 3) as output which can be loaded directly by the XPM library.- xbmtopbm dot | ppmtoxpm -name dot
- xbmtopbm dot | ppmtoxpm -name dot -rgb rgb.txt
OPTIONS¶
- -name=xpmname
- The -name option allows you to specify the prefix string which is printed in the resulting XPM output. If not specified, will default to the filename (without extension) of the <ppmfile> argument. If you do not specify -name or ppmfile, (i.e. your input is from Standad Input), the prefix string defaults to the string noname.
- rgb=rgb-textfile
- The -rgb option allows you to specify an X11 rgb
text file for the lookup of color name mnemonics. This rgb text file is
typically the /usr/lib/X11/rgb.txt of the MIT X11 distribution, but any
file using the same format may be used. When specified and a RGB value
from the ppm input matches a RGB value from the <rgb-textfile>, then
the corresponding color name mnemonic is printed in the XPM's colormap. If
you don't specify -rgb or if the RGB values don't match, then
ppmtoxpm produces the color specifications in the #RGB, #RRGGBB,
#RRRGGGBBB, or #RRRRGGGGBBBB hexadecimal format.
- -alphamask=pgmfile
- This option names a PGM file to use as an alpha
(transparency) mask. The file must contain an image the same dimensions as
the input image. ppmtoxpm marks as transparent any pixel whose
position in the alpha mask image is at most half white.
LIMITATIONS¶
An option to match the closest (rather than exact) color name mnemonic from the rgb text would be a desirable enhancement. Truncation of the least significant bits of a RGB value may result in nonexact matches when performing color name mnemonic lookups.SEE ALSO¶
ppmcolormask(1), xpmtoppm(1), ppm(5)AUTHOR¶
Copyright (C) 1990 by Mark W. Snitily.Paul Breslaw, Mecasoft SA, Zurich, Switzerland (paul@mecazh.uu.ch)
Thu Nov 8 16:01:17 1990
Arnaud Le Hors (lehors@mirsa.inria.fr)
Tue Apr 9 1991
Tue Apr 9 1991 |