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       [-mwidth=pixels]   [-left=pixels]   [-right=pixels]    [-height=pixels]
12       [-valign=ratio]  [-mheight=pixels] [-top=pixels] [-bottom=pixels] [pnm‐
13       file]
14
15
16

DESCRIPTION

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

OPTIONS

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

HISTORY

128       Before  February  2002,  pnmpad had a different option syntax which was
129       less expressive and not like conventional Netpbm programs.  That syntax
130       is still understood by pnmpad for backward compatibility, but not docu‐
131       mented or supported for future use.
132
133
134

SEE ALSO

136       pbmmake(1), pnmpaste(1),  pamcut(1),  pnmcrop(1),  pamcomp(1),  pnmmar‐
137       gin(1), pbm(1)
138
139
140

AUTHOR

142       Copyright (C) 2002 by Martin van Beilen
143
144       Copyright (C) 1990 by Angus Duggan
145
146       Copyright (C) 1989 by Jef Poskanzer.
147
148       Permission  to  use, copy, modify, and distribute this software and its
149       documentation for any purpose and without fee is hereby  granted,  pro‐
150       vided  that  the  above  copyright notice appear in all copies and that
151       both that copyright notice and this permission notice  appear  in  sup‐
152       porting  documentation.   This  software  is  provided  "as is" without
153       express or implied warranty.
154

DOCUMENT SOURCE

156       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
157       source.  The master documentation is at
158
159              http://netpbm.sourceforge.net/doc/pnmpad.html
160
161netpbm documentation              1 July 2015            Pnmpad User Manual(0)
Impressum