192 lines
5.2 KiB
HTML
192 lines
5.2 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of ppmtoxpm</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>ppmtoxpm</H1>
|
|
Section: User Commands (1)<BR>Updated: Tue Apr 9 1991<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
ppmtoxpm - convert a portable pixmap into an X11 pixmap
|
|
<P>
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>ppmtoxpm </B>
|
|
|
|
[<B>-name=</B><I>xpmname</I>]
|
|
|
|
[<B>-rgb=</B><I>rgb-textfile</I>]
|
|
|
|
[<B>-alphamask=</B><I>pgmfile</I>]
|
|
|
|
[<I>ppmfile</I>]
|
|
|
|
<P>
|
|
Minimum unique abbrevations are acceptable.
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
Reads a portable pixmap as input. Produces X11 pixmap (version 3) as
|
|
output which can be loaded directly by the XPM library.
|
|
<P>
|
|
<P>
|
|
|
|
For example, to convert the file "dot" (found in /usr/include/X11/bitmaps),
|
|
from xbm to xpm one could specify
|
|
<DL COMPACT>
|
|
<DT id="1"><DD>
|
|
xbmtopbm dot | ppmtoxpm -name dot
|
|
</DL>
|
|
<P>
|
|
|
|
or, with a rgb text file (in the local directory)
|
|
<DL COMPACT>
|
|
<DT id="2"><DD>
|
|
xbmtopbm dot | ppmtoxpm -name dot -rgb rgb.txt
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="3"><B>-name=</B><I>xpmname</I>
|
|
|
|
<DD>
|
|
The
|
|
<B>-name </B>
|
|
|
|
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
|
|
<B>-name </B>
|
|
|
|
or
|
|
<I>ppmfile</I>,
|
|
|
|
(i.e. your input is from Standad Input), the prefix string
|
|
defaults to the string
|
|
<B>noname</B>.
|
|
|
|
<DT id="4"><B>rgb=</B><I>rgb-textfile</I>
|
|
|
|
<DD>
|
|
The
|
|
<B>-rgb </B>
|
|
|
|
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
|
|
<B>-rgb or if the RGB values don't</B>
|
|
|
|
match, then
|
|
<B>ppmtoxpm produces the color specifications in the #RGB, #RRGGBB,</B>
|
|
|
|
#RRRGGGBBB, or #RRRRGGGGBBBB hexadecimal format.
|
|
<P>
|
|
<DT id="5"><B>-alphamask=</B><I>pgmfile</I>
|
|
|
|
<DD>
|
|
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.
|
|
<B>ppmtoxpm</B>
|
|
|
|
marks as transparent any pixel whose position in the alpha mask image
|
|
is at most half white.
|
|
<P>
|
|
If you don't specify
|
|
<B>-alphamask</B>,
|
|
|
|
<B>ppmtoxpm</B>
|
|
|
|
makes all pixels in the output opaque.
|
|
<P>
|
|
<B>ppmcolormask</B>
|
|
|
|
is one way to generate an alpha mask file. You might also generate it
|
|
by extracting transparency information from an XPM file with
|
|
the
|
|
<B>-alphaout</B>
|
|
|
|
option to
|
|
<B>xpmtoppm</B>.
|
|
|
|
There are similar options on other Netpbm converters that convert from
|
|
formats that include transparency information too.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>LIMITATIONS</H2>
|
|
|
|
An option to match the closest (rather than exact) color name mnemonic
|
|
from the rgb text would be a desirable enhancement.
|
|
<P>
|
|
|
|
Truncation of the least significant bits of a RGB value may result in
|
|
nonexact matches when performing color name mnemonic lookups.
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ppmcolormask">ppmcolormask</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+xpmtoppm">xpmtoppm</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+ppm">ppm</A></B>(5)
|
|
|
|
<BR>
|
|
|
|
XPM Manual by Arnaud Le Hors <A HREF="mailto:lehors@mirsa.inria.fr">lehors@mirsa.inria.fr</A>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Copyright (C) 1990 by Mark W. Snitily.
|
|
<P>
|
|
Permission to use, copy, modify, and distribute this software and its
|
|
documentation for any purpose and without fee is hereby granted, provided
|
|
that the above copyright notice appear in all copies and that both that
|
|
copyright notice and this permission notice appear in supporting
|
|
documentation. This software is provided "as is" without express or
|
|
implied warranty.
|
|
<P>
|
|
This tool was developed for Schlumberger Technologies, ATE Division, and
|
|
with their permission is being made available to the public with the above
|
|
copyright notice and permission notice.
|
|
<P>
|
|
Upgraded to XPM2 by
|
|
<BR> Paul Breslaw, Mecasoft SA, Zurich, Switzerland (<A HREF="mailto:paul@mecazh.uu.ch">paul@mecazh.uu.ch</A>)
|
|
<BR> Thu Nov 8 16:01:17 1990
|
|
<P>
|
|
Upgraded to XPM version 3 by
|
|
<BR> Arnaud Le Hors (<A HREF="mailto:lehors@mirsa.inria.fr">lehors@mirsa.inria.fr</A>)
|
|
<BR> Tue Apr 9 1991
|
|
<P>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="7"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="8"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="9"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="10"><A HREF="#lbAF">LIMITATIONS</A><DD>
|
|
<DT id="11"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="12"><A HREF="#lbAH">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:25 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|