man-pages/man1/ppmtoxpm.1.html
2021-03-31 01:06:50 +01:00

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">&nbsp;</A>
<H2>NAME</H2>
ppmtoxpm - convert a portable pixmap into an X11 pixmap
<P>
<A NAME="lbAC">&nbsp;</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">&nbsp;</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 &quot;dot&quot; (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">&nbsp;</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 &lt;ppmfile&gt; 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 &lt;rgb-textfile&gt;, 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">&nbsp;</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">&nbsp;</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">&nbsp;</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 &quot;as is&quot; 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>&nbsp;&nbsp;&nbsp;Paul&nbsp;Breslaw,&nbsp;Mecasoft&nbsp;SA,&nbsp;Zurich,&nbsp;Switzerland&nbsp;(<A HREF="mailto:paul@mecazh.uu.ch">paul@mecazh.uu.ch</A>)
<BR>&nbsp;&nbsp;&nbsp;Thu&nbsp;Nov&nbsp;&nbsp;8&nbsp;16:01:17&nbsp;1990
<P>
Upgraded to XPM version 3 by
<BR>&nbsp;&nbsp;&nbsp;Arnaud&nbsp;Le&nbsp;Hors&nbsp;(<A HREF="mailto:lehors@mirsa.inria.fr">lehors@mirsa.inria.fr</A>)
<BR>&nbsp;&nbsp;&nbsp;Tue&nbsp;Apr&nbsp;9&nbsp;1991
<P>
<P>
<HR>
<A NAME="index">&nbsp;</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>