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

NAME

6       pnmpad - add borders to a PNM image
7
8

SYNOPSIS

10       pnmpad   [-verbose]   [-white|-black]  [-width=pixels]  [-halign=ratio]
11       [-left=pixels]   [-right=pixels]    [-height=pixels]    [-valign=ratio]
12       [-top=pixels] [-bottom=pixels] [pnmfile]
13
14
15

DESCRIPTION

17       This program is part of Netpbm(1).
18
19       pnmpad  reads  a PNM image as input and outputs a PNM image that is the
20       input image plus black or white borders of the sizes specified.
21
22       If you just need to convert an image to a certain  size  regardless  of
23       the  original  dimensions,  pamcut with the -pad option may be a better
24       choice.
25
26       pnmmargin does essentially the same thing, but allows you to  add  bor‐
27       ders of any color and requires all four borders to be the same size.
28
29
30

OPTIONS

32       All  options  can  be abbreviated to their shortest unique prefix.  You
33       may use two hyphens instead of one to designate an option.  You may use
34       either  white  space  or  an equals sign between an option name and its
35       value.
36
37
38
39       -verbose
40              Verbose output.
41
42
43       -white
44
45       -black Set pad color.  Default is -black.
46
47
48
49       -left=pixels
50
51       -right=pixels
52
53       -width=width
54
55       -halign=ratio
56              Specify amount of left and right padding in pixels.
57
58              -left and -right directly specify the amount of padding added to
59              the left and right sides, respectively, of the image.
60
61              Alternatively,  you can specify -width and just one of -left and
62              -right and pnmpad calculates the required padding on  the  other
63              side based on the width of the input image.  If the -width value
64              is less than the width of the image plus the specified  padding,
65              the -width values is ignored.
66
67              If  you specify all three of -width, -left, and -right, you must
68              ensure that the -left and -right padding are sufficient to  make
69              the image at least as wide as -width specifies.  Otherwise, pnm‐
70              pad fails.
71
72              When you specify -width without -left or -right, and  -width  is
73              larger  than the input image, pnmpad chooses left and right pad‐
74              ding amounts in a certain ratio.  That ratio defaults  to  half,
75              but  you  can  set it to anything (from 0 to 1) with the -halign
76              option.  If the input image is  already  at  least  as  wide  as
77              -width specifies, pnmpad adds no padding.
78
79              Common values for -halign are:
80
81
82       0.0    left aligned
83
84
85       0.5    center aligned (default)
86
87
88       1.0    right aligned
89
90
91              Before  Netpbm 10.23 (July 2004), pnmpad did not allow the -left
92              or -right option together with -width.
93
94
95       -top=pixels
96
97       -bottom=pixels
98
99       -height=height
100
101       -valign=ratio
102              These options determine the vertical padding.  They  are  analo‐
103              gous to the horizontal padding options above.
104
105
106
107
108

HISTORY

110       Before  February  2002,  pnmpad had a different option syntax which was
111       less expressive and not like conventional Netpbm programs.  That syntax
112       is still understood by pnmpad for backward compatibility, but not docu‐
113       mented or supported for future use.
114
115
116

SEE ALSO

118       pbmmake(1), pnmpaste(1),  pamcut(1),  pnmcrop(1),  pamcomp(1),  pnmmar‐
119       gin(1), pbm(1)
120
121
122

AUTHOR

124       Copyright (C) 2002 by Martin van Beilen
125
126       Copyright (C) 1990 by Angus Duggan
127
128       Copyright (C) 1989 by Jef Poskanzer.
129
130       Permission  to  use, copy, modify, and distribute this software and its
131       documentation for any purpose and without fee is hereby  granted,  pro‐
132       vided  that  the  above  copyright notice appear in all copies and that
133       both that copyright notice and this permission notice  appear  in  sup‐
134       porting  documentation.   This  software  is  provided  'as is' without
135       express or implied warranty.
136
137
138
139netpbm documentation             20 March 2009           Pnmpad User Manual(0)
Impressum