1Pnmshear User Manual(0)                                Pnmshear User Manual(0)
2
3
4

NAME

6       pnmshear - shear a PNM image by a specified angle
7
8

SYNOPSIS

10       pnmshear
11
12       [-noantialias] [-background=color] angle [pnmfile]
13
14       All  options  can  be abbreviated to their shortest unique prefix.  You
15       may use two hyphens instead of one to designate an option.  You may use
16       either  white  space  or  equals  signs  between an option name and its
17       value.
18
19

DESCRIPTION

21       This program is part of Netpbm(1).
22
23       pnmshear reads a PNM image as input and shears it by the specified  an‐
24       gle  and produce a PNM image as output.  If the input file is in color,
25       the output will be too, otherwise it will be grayscale.  The  angle  is
26       in degrees (floating point), and measures this:
27
28           +-------+  +-------+
29           |       |  |\       \
30           |  OLD  |  | \  NEW  \
31           |       |  |an\       \
32           +-------+  |gle+-------+
33
34
35       If the angle is negative, it shears the other way:
36           +-------+  |-an+-------+
37           |       |  |gl/       /
38           |  OLD  |  |e/  NEW  /
39           |       |  |/       /
40           +-------+  +-------+
41
42
43       The angle should not get too close to 90 or -90, or the resulting image
44       will be unreasonably wide.  In fact, if it gets too  close,  the  width
45       will be so large that pnmshear cannot do computations in the word sizes
46       it uses, and the program detects this and fails.
47
48       pnmshear does the shearing by looping over the source pixels  and  dis‐
49       tributing  fractions  to  each  of the destination pixels.  This has an
50       "anti-aliasing" effect - it avoids jagged edges and similar  artifacts.
51       However,  it also means that the original colors in the image are modi‐
52       fied and there are typically more of them than you  started  with.   If
53       you need to keep precisely the same set of colors, see the -noantialias
54       option.  If the expanded palette is a problem, you can run  the  result
55       through pnmquant.
56
57

OPTIONS

59       In  addition  to  the options common to all programs based on libnetpbm
60       (most notably -quiet, see
61        Common Options ⟨index.html#commonoptions⟩ ), pnmshear  recognizes  the
62       following command line options:
63
64
65
66       -background=color
67              This determines the color of the background on which the sheared
68              image sits.
69
70              Specify the color (color) as described for the argument  of  the
71              pnm_parsecolor()                 library                 routine
72              ⟨libnetpbm_image.html#colorname⟩ .
73
74              By default, if you don't specify this option,  pnmshear  selects
75              what  appears  to  it to be the background color of the original
76              image.  It determines this color rather simplistically, by  tak‐
77              ing  an  average of the colors of the two top corners of the im‐
78              age.
79
80              This option was new in Netpbm  10.37  (December  2006).   Before
81              that, pnmshear always behaved as is the default now.
82
83
84       -noantialias
85              This option forces pnmshear to simply move pixels around instead
86              of synthesizing output pixels from multiple input  pixels.   The
87              latter  could cause the output to contain colors that are not in
88              the input, which may not be desirable.  It also  probably  makes
89              the  output  contain  a  large  number of colors.  If you need a
90              small number of colors, but it doesn't matter if  they  are  the
91              exact ones from the input, consider using pnmquant on the output
92              instead of using -noantialias.
93
94              Note that to ensure the output does not contain colors that  are
95              not  in  the input, you also must consider the background color.
96              See the -background option.
97
98
99
100

SEE ALSO

102       pnmrotate(1), pamflip(1), pamhomography(1), pnmquant(1), pamrestack(1),
103       pnm(1)
104
105
106

AUTHOR

108       Copyright (C) 1989, 1991 by Jef Poskanzer.
109

DOCUMENT SOURCE

111       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
112       source.  The master documentation is at
113
114              http://netpbm.sourceforge.net/doc/pnmshear.html
115
116netpbm documentation             22 March 2020         Pnmshear User Manual(0)
Impressum