108 lines
2.8 KiB
HTML
108 lines
2.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of pnmshear</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>pnmshear</H1>
|
|
Section: User Commands (1)<BR>Updated: 12 January 1991<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>
|
|
|
|
pnmshear - shear a portable anymap by some angle
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>pnmshear</B>
|
|
|
|
[<B>-noantialias</B>]
|
|
|
|
<I>angle</I>
|
|
|
|
[<I>pnmfile</I>]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
Reads a portable anymap as input.
|
|
Shears it by the specified angle and produces a portable
|
|
anymap as output.
|
|
<A NAME="ixAAC"></A>
|
|
If the input file is in color, the output will be too,
|
|
otherwise it will be grayscale.
|
|
The angle is in degrees (floating point), and measures this:
|
|
<PRE>
|
|
+-------+ +-------+
|
|
| | |\ \
|
|
| OLD | | \ NEW \
|
|
| | |an\ \
|
|
+-------+ |gle+-------+
|
|
</PRE>
|
|
|
|
If the angle is negative, it shears the other way:
|
|
<PRE>
|
|
+-------+ |-an+-------+
|
|
| | |gl/ /
|
|
| OLD | |e/ NEW /
|
|
| | |/ /
|
|
+-------+ +-------+
|
|
</PRE>
|
|
|
|
The angle should not get too close to 90 or -90, or the resulting
|
|
anymap will be unreasonably wide.
|
|
<P>
|
|
|
|
The shearing is implemented by looping over the source pixels and distributing
|
|
fractions to each of the destination pixels.
|
|
This has an "anti-aliasing" effect - it avoids jagged edges and similar
|
|
artifacts.
|
|
<A NAME="ixAAD"></A>
|
|
However, it also means that the original colors or gray levels in the image
|
|
are modified.
|
|
If you need to keep precisely the same set of colors, you can use
|
|
the
|
|
<B>-noantialias</B>
|
|
|
|
flag. This does the shearing by moving pixels without changing their values.
|
|
If you want anti-aliasing and don't care about the precise colors, but
|
|
still need a limited *number* of colors, you can run the result through
|
|
<I>ppmquant</I>.
|
|
|
|
<A NAME="ixAAE"></A>
|
|
<P>
|
|
|
|
All flags can be abbreviated to their shortest unique prefix.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?1+pnmrotate">pnmrotate</A>(1), <A HREF="/cgi-bin/man/man2html?1+pnmflip">pnmflip</A>(1), <A HREF="/cgi-bin/man/man2html?5+pnm">pnm</A>(5), <A HREF="/cgi-bin/man/man2html?1+ppmquant">ppmquant</A>(1)
|
|
<A NAME="lbAF"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Copyright (C) 1989, 1991 by Jef Poskanzer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="4"><A HREF="#lbAE">SEE ALSO</A><DD>
|
|
<DT id="5"><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>
|