Debian Codegraph @

userguide/pnmmargin.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
2 <html><head><title>Pnmmargin User Manual</title></head>
3 <body>
4 <h1>pnmmargin</h1>
5 Updated: 26 December 2025
6 <br>
7 <a href="#index">Table Of Contents</a>
8
9 <h2>NAME</h2>
10
11 pnmmargin - add borders to a PNM image
12
13 <h2 id="synopsis">SYNOPSIS</h2>
14
15 <b>pnmmargin</b>
16 [<b>-white</b>|<b>-black</b>|<b>-color</b> <i>colorspec</i>] <i>size</i>
17 [<i>pnmfile</i>]
18
19 <h2 id="description">DESCRIPTION</h2>
20
21 <p>This program is part of <a href="index.html">Netpbm</a>.
22
23 <p><b>pnmmargin</b> adds a border around a PNM image.
24
25
26 <h2 id="arguments">ARGUMENTS</h2>
27
28 <p><i>pnmfile</i> is the name of the input file. If you don't specify this
29 argument, <b>pnmmargin</b> reads the input image from its Standard Input.
30
31
32 <h2 id="options">OPTIONS</h2>
33
34 <p>In addition to the options common to all programs based on libnetpbm
35 (most notably <b>-plain</b>, see <a href="index.html#commonoptions">
36 Common Options</a>), <b>pnmmargin</b> recognizes the following
37 command line options:
38
39 <p>You can specify the border color with the <b>-white</b>,
40 <b>-black</b>, and <b>-color</b> options. If you don't specify a color, the
41 program makes a guess.
42
43 <b>-white</b> and <b>-black</b> are the same as <b>-color=white</b>
44 and <b>-color=black</b> respectively (except that the latter fail if you
45 don&apos;t have a color dictionary set up in your environment, so they are
46 really more like <b>-color=rgbi:0/0/0</b> and
47 <b>-color=rgbi:1/1/1</b>.
48
49 <p>The value of <b>-color</b> is like the
50 <a href="libnetpbm_image.html#colorname">argument of the
51 <b>pnm_parsecolor()</b> library routine</a>.
52
53 <p>The <b>-plain</b> common option was implemented beginning with Netpbm
54 version 10.40 (September 2007).
55
56 <p>The <b>-quiet</b> common option is not implemented.
57
58 <h2 id="notes">NOTES</h2>
59
60 <p><b>pnmpad</b> does essentially the same thing, but gives you more control
61 over the individual margins and does only black and white margins.
62
63 <p>To remove a border of a specified size from an image, use<b>pamcut</b>.
64 <b>pnmcrop</b> also removes borders, but determines by itself what is border
65 and what is subject.
66
67 <p>If you want to make the image a certain required size, adding borders
68 or cropping as necessary, <b>pamcut</b> may be what you want.
69
70
71 <h2 id="seealso">SEE ALSO</h2>
72
73 <ul>
74 <li><a href="pamcut.html">pamcut</a>
75 <li><a href="pnmcrop.html">pnmcrop</a>
76 <li><a href="pamcat.html">pamcat</a>
77 <li><a href="pnmpad.html">pnmpad</a>
78 <li><a href="pnm.html">pnm</a>
79 </ul>
80
81 <h2 id="author">AUTHOR</h2>
82
83 Copyright (C) 1991 by Jef Poskanzer.
84
85 <hr>
86 <h2 id="index">Table Of Contents</h2>
87 <ul>
88 <li><a href="#synopsis">SYNOPSIS</a>
89 <li><a href="#description">DESCRIPTION</a>
90 <li><a href="#arguments">ARGUMENTS</a>
91 <li><a href="#options">OPTIONS</a>
92 <li><a href="#notes">NOTES</a>
93 <li><a href="#seealso">SEE ALSO</a>
94 <li><a href="#author">AUTHOR</a>
95 </ul>
96 </body>
97 </html>