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

209 lines
4.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of pnmcrop</TITLE>
</HEAD><BODY>
<H1>pnmcrop</H1>
Section: User Commands (1)<BR>Updated: 18 March 2001<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">&nbsp;</A>
<H2>NAME</H2>
pnmcrop - crop a portable anymap
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>pnmcrop</B>
[<B>-white</B>|<B>-black</B>|<B>-sides</B>]
[<B>-left</B>]
[<B>-right</B>]
[<B>-top</B>]
[<B>-bottom</B>]
[<I>pnmfile</I>]
<P>
All options may be abbreviated to their shortest unique prefix or
specified with double hyphens.
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
Reads a PBM, PGM, or PPM image as input. Removes borders that are the
background color, and produces the same type of image as output.
<A NAME="ixAAC"></A>
<P>
If you don't specify otherwise,
<B>pnmcrop</B>
assumes the background color is whatever color the top left and right
corners of the image are and if they are different colors, something
midway between them. You can specify that the background is white or
black with the
<B>-white</B>
and
<B>-black</B>
options or make
<B>pnmcrop</B>
base its guess on all four corners instead of just two with
<B>-sides</B>.
<P>
By default,
<B>pnmcrop</B>
chops off any stripe of background color it finds, on all four sides.
You can tell
<B>pnmcrop</B>
to remove only specific borders with the
<B>-left</B>,
<B>-right</B>,
<B>-top</B>,
and
<B>-bottom</B>
options.
<P>
If you want to chop a specific amount off the side of an image, use
<B>pnmcut</B>.
<P>
If you want to add different borders after removing the existing ones,
use
<B>pnmcat</B>
or
<B>pnmcomp</B>.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
<DL COMPACT>
<DT id="1"><B>-white</B>
<DD>
Take white to be the background color.
<B>pnmcrop </B>
removes borders which are white.
<DT id="2"><B>-black</B>
<DD>
Take black to be the background color.
<B>pnmcrop </B>
removes borders which are black.
<DT id="3"><B>-sides</B>
<DD>
Determine the background color from the colors of the four corners of
the input image.
<B>pnmcrop</B>
removes borders which are of the background color.
<P>
If at least three of the four corners are the same color,
<B>pnmcrop </B>
takes that as the background color.
If not,
<B>pnmcrop</B>
looks for two corners of the same color in the following order, taking
the first found as the background color: top, left, right, bottom. If
all four corners are different colors,
<B>pnmcrop</B>
assumes an average of the four colors as the background color.
<P>
The
<B>-sides</B>
option slows
<B>pnmcrop</B>
down, as it reads the entire image to determine the background color
in addition to the up to three times that it would read it without
<B>-sides</B>.
<P>
<DT id="4"><B>-left</B>
<DD>
Remove any left border.
<DT id="5"><B>-right</B>
<DD>
Remove any right border.
<DT id="6"><B>-top</B>
<DD>
Remove any top border.
<DT id="7"><B>-bottom</B>
<DD>
Remove any bottom border.
<DT id="8"><B>-verbose</B>
<DD>
Print on Standard Error information about the processing, including
exactly how much is being cropped off of which sides.
<P>
<P>
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+pnmcut">pnmcut</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+pnmfile">pnmfile</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?5+pnm">pnm</A></B>(5)
<P>
<A NAME="lbAG">&nbsp;</A>
<H2>AUTHOR</H2>
Copyright (C) 1989 by Jef Poskanzer.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="9"><A HREF="#lbAB">NAME</A><DD>
<DT id="10"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="11"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="12"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="13"><A HREF="#lbAF">SEE ALSO</A><DD>
<DT id="14"><A HREF="#lbAG">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>