117 lines
2.8 KiB
HTML
117 lines
2.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of ppmcolormask</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>ppmcolormask</H1>
|
|
Section: User Commands (1)<BR>Updated: 14 April 2000<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="ixAAB"></A>
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
ppmcolormask - produce mask of areas of a certain color in a PPM file
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>ppmcolormask</B>
|
|
|
|
<I>color</I>
|
|
|
|
[<I>ppmfile</I>]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
Reads a PPM file as input. Produces a PBM (bitmap) file as output.
|
|
The output file is the same dimensions as the input file and is black in
|
|
all places where the input file is the color
|
|
<I>color</I>,
|
|
|
|
and white everywhere else.
|
|
<P>
|
|
The output of
|
|
<B>ppmcolormask</B>
|
|
|
|
is useful as an alpha mask input to
|
|
<B>pnmcomp</B>.
|
|
|
|
Note that you can generate such an alpha mask automatically as you convert
|
|
to PNG format with
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pnmtopng">pnmtopng</A></B>(1).
|
|
|
|
Use its
|
|
<B>-transparent</B>
|
|
|
|
option.
|
|
<P>
|
|
<I>ppmfile</I>
|
|
|
|
is the input file. If you don't specify
|
|
<I>ppmfile</I>,
|
|
|
|
the input is from Standard Input.
|
|
<P>
|
|
The output goes to Standard Output.
|
|
<P>
|
|
You can specify
|
|
<I>color</I>
|
|
|
|
five ways:
|
|
<A NAME="ixAAC"></A>
|
|
<DL COMPACT>
|
|
<DT id="1">o<DD>
|
|
An X11-style color name (e.g.
|
|
<B>black</B>).
|
|
|
|
<DT id="2">o <DD>
|
|
An X11-style hexadecimal specifier: rgb:r/g/b, where r g and b are
|
|
each 1- to 4-digit hexadecimal numbers.
|
|
<DT id="3">o<DD>
|
|
An X11-style decimal specifier: rgbi:r/g/b, where r g and b are
|
|
floating point numbers between 0 and 1.
|
|
<DT id="4">o <DD>
|
|
For backwards compatibility, an old-X11-style hexadecimal number:
|
|
#rgb, #rrggbb, #rrrgggbbb, or #rrrrggggbbbb.
|
|
<DT id="5">o <DD>
|
|
For backwards compatibility, a triplet of numbers separated by
|
|
commas: r,g,b, where r g and b are floating point numbers between 0
|
|
and 1. (This style was added before MIT came up with the similar rgbi
|
|
style.)
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pgmtoppm">pgmtoppm</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pnmcomp">pnmcomp</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pbmmask">pbmmask</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+ppm">ppm</A>(5)</B>
|
|
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Bryan Henderson (<A HREF="mailto:bryanh@giraffe-data.com">bryanh@giraffe-data.com</A>)
|
|
<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">SEE ALSO</A><DD>
|
|
<DT id="10"><A HREF="#lbAF">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:24 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|