about summary refs log tree commit diff
path: root/pnmpad.html
blob: 3b5f556fd7caa6bec0e68f9386168a9659990c2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Pnmpad User Manual</TITLE></HEAD>
<BODY>
<H1>pnmpad</H1>
Updated: 26 January 2002
<BR>
<A HREF="#index">Table Of Contents</A>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

pnmpad - add borders to a PNM image

<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<B>pnmpad </B>
[<B>-verbose</B>]
[<B>-white</B>|<B>-black</B>]
<BR>
[<B>-width=</B><I>pixels</I>]
[<B>-halign=</B><I>ratio</I>]
<BR>
[<B>-left=</B><I>pixels</I>]
[<B>-right=</B><I>pixels</I>]
<BR>
[<B>-height=</B><I>pixels</I>]
[<B>-valign=</B><I>ratio</I>]
<BR>
[<B>-top=</B><I>pixels</I>]
[<B>-bottom=</B><I>pixels</I>]
<BR>
[<I>pnmfile</I>]

<P>All options can be abbreviated to their shortest unique prefix.  You
may use two hyphens instead of one to designate an option.  You may
use either white space or an equals sign between an option name and
its value.

<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<P><b>pnmpad</b> reads a PNM image as input and outputs a PNM image
that is the input image plus black or white borders of the sizes
specified.

<P>If you just need to convert an image to a certain size regardless
of the original dimensions, <B>pamcut</B> with the <B>-pad</B> option
may be a better choice.

<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>

<DL>
<DT><B>-verbose</B>

<DD>
Verbose output.

<dt><B>-white</B>
<dt><B>-black</B>

<dd>Set pad color.  Default is <b>-black</b>.


<dt><B>-left=</B><I>pixels</I>
<dt><B>-right=</B><I>pixels</I>
<dt><B>-width=</B><I>width</I>
<dt><B>-halign=</B><I>ratio</I>

<dd>Specify amount of left and right padding in pixels.

<p><b>-left</b> and <b>-right</b> directly specify the amount of
padding added to the left and right sides, respectively, of the image.

<p>Alternatively, you can specify <b>-width</b> and just one of
<b>-left</b> and <b>-right</b> and <b>pnmpad</b> calculates the required
padding on the other side based on the width of the input image.  If
the <b>-width</b> value is less than the width of the image plus the
specified padding, the <b>-width</b> values is ignored.

<p>If you specify all three of <b>-width</b>, <b>-left</b>, and
<b>-right</b>, you must ensure that the <b>-left</b> and <b>-right</b>
padding are sufficient to make the image at least as wide as
<b>-width</b> specifies.  Otherwise, <b>pnmpad</b> fails.

<p>When you specify <b>-width</b> without <b>-left</b> or
<b>-right</b>, and <b>-width</b> is larger than the input image,
<b>pnmpad</b> chooses left and right padding amounts in a certain
ratio.  That ratio defaults to half, but you can set it to anything
(from 0 to 1) with the <b>-halign</b> option.  If the input image is
already at least as wide as <b>-width</b> specifies, <b>pnmpad</b>
adds no padding.

<p>Common values for <b>-halign</b> are:
<DL COMPACT>
<DT><B>0.0</B> <DD>left aligned

<DT><B>0.5</B> <DD>center aligned (default)

<DT><B>1.0</B> <DD>right aligned
</DL>

<p>Before Netpbm 10.23 (July 2004), <b>pnmpad</b> did not allow the
<b>-left</b> or <b>-right</b> option together with <b>-width</b>.

<dt><B>-top=</B><I>pixels</I>
<dt><B>-bottom=</B><I>pixels</I>
<dt><B>-height=</B><I>height</I>
<dt><B>-valign=</B><I>ratio</I>

<dd>
These options determine the vertical padding.  They are analogous
to the horizontal padding options above.

</dl>

<A NAME="lbAF">&nbsp;</A>
<H2>HISTORY</H2>

<p>Before February 2002, <B>pnmpad</B> had a different option syntax
which was less expressive and not like conventional Netpbm programs.
That syntax is still understood by <B>pnmpad</B> for backward
compatibility, but not documented or supported for future use.

<A NAME="lbAG">&nbsp;</A> 
<H2>SEE ALSO</H2>

<B><A HREF="pbmmake.html">pbmmake</A></B>,
<B><A HREF="pnmpaste.html">pnmpaste</A></B>,
<B><A HREF="pamcut.html">pamcut</A></B>,
<B><A HREF="pnmcrop.html">pnmcrop</A></B>,
<B><A HREF="pamcomp.html">pamcomp</A></B>,
<B><A HREF="pbm.html">pbm</A></B>

<A NAME="lbAH">&nbsp;</A>
<H2>AUTHOR</H2>

<p>Copyright (C) 2002 by Martin van Beilen

<p>Copyright (C) 1990 by Angus Duggan

<p>Copyright (C) 1989 by Jef Poskanzer.

<P>Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation.  This software is provided &quot;as is&quot;
without express or implied warranty.

<HR>
<A NAME="index">&nbsp;</A>
<H2>Table Of Contents</H2>
<UL>
<LI><A HREF="#lbAB">NAME</A>
<LI><A HREF="#lbAC">SYNOPSIS</A>
<LI><A HREF="#lbAD">DESCRIPTION</A>
<LI><A HREF="#lbAE">OPTIONS</A>
<LI><A HREF="#lbAF">HISTORY</A>
<LI><A HREF="#lbAG">SEE ALSO</A>
<LI><A HREF="#lbAH">AUTHOR</A>
</UL>
</BODY>
</HTML>