262 lines
5.1 KiB
HTML
262 lines
5.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of pamcut</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>pamcut</H1>
|
|
Section: User Commands (1)<BR>Updated: 03 August 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>
|
|
|
|
pamcut - cut a rectangle out of a PAM, PBM, PGM, or PPM image
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>pamcut</B>
|
|
|
|
[<B>-left </B><I>leftcol</I>]
|
|
|
|
[<B>-right </B><I>rightcol</I>]
|
|
|
|
[<B>-top </B><I>toprow</I>]
|
|
|
|
[<B>-bottom </B><I>bottomrow</I>]
|
|
|
|
[<B>-width </B><I>width</I>]
|
|
|
|
[<B>-height </B><I>height</I>]
|
|
|
|
[<B>-pad</B>]
|
|
|
|
[<B>-verbose</B>]
|
|
|
|
[
|
|
<I>left right width height</I>
|
|
|
|
]
|
|
[<I>pnmfile</I>]
|
|
|
|
<P>
|
|
All options may be abbreviated to the shortest unique prefix.
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
Reads a PAM, PBM, PGM, or PPM image as input. Extracts the specified
|
|
rectangle, and produces the same kind of image as output.
|
|
<A NAME="ixAAC"></A>
|
|
<P>
|
|
There are two ways to specify the rectangle to cut: arguments and options.
|
|
Options are easier to remember and read, more expressive, and allow you
|
|
to use defaults. Arguments were the only way available before July 2000.
|
|
<P>
|
|
If you use both options and arguments, the two specifications get
|
|
mixed in an unspecified way.
|
|
<P>
|
|
To use options, just code any mixture of the
|
|
<B>-left</B>,
|
|
|
|
<B>-right</B>,
|
|
|
|
<B>-top</B>,
|
|
|
|
<B>-bottom</B>,
|
|
|
|
<B>-width</B>,
|
|
|
|
and
|
|
<B>-height</B>
|
|
|
|
options. What you don't specify defaults. It is an error to overspecify,
|
|
i.e. to specify all three of
|
|
<B>-left</B>,
|
|
|
|
<B>-right</B>,
|
|
|
|
and
|
|
<B>-width</B>
|
|
|
|
or
|
|
<B>-top</B>,
|
|
|
|
<B>-bottom</B>,
|
|
|
|
and
|
|
<B>-height</B>.
|
|
|
|
<P>
|
|
To use arguments, specify all four of the
|
|
<I>left</I>,
|
|
|
|
<I>right</I>,
|
|
|
|
<I>width</I>,
|
|
|
|
and
|
|
<I>height</I>
|
|
|
|
arguments.
|
|
<I>left</I>
|
|
|
|
and
|
|
<I>top</I>
|
|
|
|
have the same effect as specifying them as the argument of a
|
|
<B>-left</B>
|
|
|
|
or
|
|
<B>-top</B>
|
|
|
|
option, respectively.
|
|
<I>width</I>
|
|
|
|
and
|
|
<I>height</I>
|
|
|
|
have the same effect as specifying them as the argument of a
|
|
<B>-width</B>
|
|
|
|
or
|
|
<B>-height</B>
|
|
|
|
option, respectively, where they are positive. Where they are not positive,
|
|
they have the same effect as specifying one less than the value as the
|
|
argument to a
|
|
<B>-right</B>
|
|
|
|
or
|
|
<B>-bottom</B>
|
|
|
|
option, respectively. (E.g.
|
|
<I>width </I>
|
|
|
|
= 0 makes the cut go all the way to the right edge). Before July
|
|
2000, negative numbers were not allowed for
|
|
<I>width</I>
|
|
|
|
and
|
|
<I>height</I>.
|
|
|
|
<P>
|
|
Input is from Standard Input if you don't specify the input file
|
|
<I>pnmfile</I>.
|
|
|
|
<P>
|
|
Output is to Standard Output.
|
|
<P>
|
|
If you are splitting a single image into multiple same-size images,
|
|
<B>pamdice</B>
|
|
|
|
is faster than running
|
|
<B>pamcut</B>
|
|
|
|
multiple times.
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-left</B>
|
|
|
|
<DD>
|
|
The column number of the leftmost column to be in the output.
|
|
If a nonnegative number, it refers to columns numbered from 0 at the left,
|
|
increasing to the right. If negative, it refers to columns numbered
|
|
-1 at the right, decreasing to the left.
|
|
<DT id="2"><B>-right</B>
|
|
|
|
<DD>
|
|
The column number of the rightmost column to be in the output, numbered
|
|
the same as for
|
|
<B>-left.</B>
|
|
|
|
<DT id="3"><B>-top</B>
|
|
|
|
<DD>
|
|
The row number of the topmost row to be in the output. If a
|
|
nonnegative number it refers to rows numbered from 0 at the top,
|
|
increasing downward. If negative, it refers to columns numbered -1 at
|
|
the bottom, decreasing upward.
|
|
<DT id="4"><B>-bottom</B>
|
|
|
|
<DD>
|
|
The row number of the bottom-most row to be in the output, numbered the
|
|
same as for
|
|
<B>-top</B>.
|
|
|
|
<DT id="5"><B>-width</B>
|
|
|
|
<DD>
|
|
The number of columns to be in the output. Must be positive.
|
|
<DT id="6"><B>-height</B>
|
|
|
|
<DD>
|
|
The number of rows to be in the output. Must be positive.
|
|
<DT id="7"><B>-pad</B>
|
|
|
|
<DD>
|
|
If the rectangle you specify is not entirely within the input image,
|
|
<B>pamcut</B>
|
|
|
|
fails unless you also specify
|
|
<B>-pad</B>.
|
|
|
|
In that case, it pads the output with black up to the edges you specify.
|
|
You can use this option if you need to have an image of certain dimensions
|
|
and have an image of arbitrary dimensions.
|
|
<P>
|
|
<B>pnmpad</B>
|
|
|
|
also adds borders to an image, but you specify their width directly.
|
|
<P>
|
|
<DT id="8"><B>-verbose</B>
|
|
|
|
<DD>
|
|
Print information about the processing to Standard Error.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pnmcrop">pnmcrop</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pnmpad">pnmpad</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pnmcat">pnmcat</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pgmslice">pgmslice</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+pnm">pnm</A></B>(5)
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Copyright (C) 1989 by Jef Poskanzer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </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:21 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|