105 lines
2.9 KiB
HTML
105 lines
2.9 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of pnmrotate</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>pnmrotate</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>
|
|
|
|
pnmrotate - rotate a portable anymap by some angle
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>pnmrotate</B>
|
|
|
|
[<B>-noantialias</B>]
|
|
|
|
<I>angle</I>
|
|
|
|
[<I>pnmfile</I>]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
Reads a portable anymap as input.
|
|
Rotates 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), measured counter-clockwise.
|
|
It can be negative, but it should be between -90 and 90.
|
|
Also, for rotations greater than 45 degrees you may get better results
|
|
if you first use
|
|
<I>pnmflip</I>
|
|
|
|
<A NAME="ixAAD"></A>
|
|
to do a 90 degree rotation and then
|
|
<I>pnmrotate</I>
|
|
|
|
less than 45 degrees back the other direction
|
|
<P>
|
|
|
|
The rotation algorithm is Alan Paeth's three-shear method.
|
|
Each shear 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="ixAAE"></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="ixAAF"></A>
|
|
<P>
|
|
|
|
All flags can be abbreviated to their shortest unique prefix.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>REFERENCES</H2>
|
|
|
|
"A Fast Algorithm for General Raster Rotation" by Alan Paeth,
|
|
Graphics Interface '86, pp. 77-81.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?1+pnmshear">pnmshear</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="lbAG"> </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">REFERENCES</A><DD>
|
|
<DT id="5"><A HREF="#lbAF">SEE ALSO</A><DD>
|
|
<DT id="6"><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>
|