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

DESCRIPTION

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

OPTIONS

47       All options can be abbreviated to their shortest  unique  prefix.   You
48       may use two hyphens instead of one to designate an option.  You may use
49       either white space or equals signs  between  an  option  name  and  its
50       value.
51
52
53
54       -background=color
55              This determines the color of the background on which the sheared
56              image sits.
57
58              Specify the color (color) as described for the argument  of  the
59              ppm_parsecolor() library routine ⟨libppm.html#colorname⟩ .
60
61              By  default,  if you don't specify this option, pnmshear selects
62              what appears to it to be the background color  of  the  original
63              image.   It determines this color rather simplisticly, by taking
64              an average of the colors of the two top corners of the image.
65
66              This option was new in Netpbm  10.37  (December  2006).   Before
67              that, pnmshear always behaved as is the default now.
68
69
70       -noantialias
71              This  option  forces  pnmrotate  to  simply  move  pixels around
72              instead of synthesizing output pixels from multiple  input  pix‐
73              els.   The  latter could cause the output to contain colors that
74              are not in the input, which may not be desirable.  It also prob‐
75              ably  makes the output contain a large number of colors.  If you
76              need a small number of colors, but it doesn't matter if they are
77              the  exact  ones  from the input, consider using pnmquant on the
78              output instead of using -noantialias.
79
80              Note that to ensure the output does not contain colors that  are
81              not  in  the input, you also must consider the background color.
82              See the -background option.
83
84
85
86

SEE ALSO

88       pnmrotate(1), pamflip(1), pnmquant(1), pnm(1)
89
90
91

AUTHOR

93       Copyright (C) 1989, 1991 by Jef Poskanzer.
94
95
96
97netpbm documentation           27 November 2006        Pnmshear User Manual(0)
Impressum