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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Pnmmontage User Manual</title></head>
<body>
<h1>pnmmontage</h1>
Updated: 22 November 2012
<br>
<a href="#index">Table Of Contents</a>
<h2>NAME</h2>
pnmmontage - create a montage of PNM images
<h2 id="synopsis">SYNOPSIS</h2>
<b>pnmmontage</b>
[<b>-header=</b><i>headerfile</i>]
[<b>-quality=</b><i>n</i>]
[<b>-prefix=</b><i>prefix</i>]
[<b>-0</b>|<b>-1</b>|<b>-2</b>|<b>...</b>|<b>-9</b>]
[<b>-data=</b><i>filename</i>]
<i>pnmfile</i>...
<h2 id="description">DESCRIPTION</h2>
<p>This program is part of <a href="index.html">Netpbm</a>.
<p><b>pnmmontage</b> packs images of differing sizes into a minimum-area
composite image.
<p>Areas of the output that cannot be occupied by an image are black.
<h2 id="options">OPTIONS</h2>
<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>pnmmontage</b> recognizes the following
command line options:
<dl compact>
<dt><b>-data=</b><i>filename</i>
<dd>This option causes <b>pnmmontage</b> to write a file that describes
in machine-readable form the positions of the original images within
the packed image. Here is an example:
<pre>
<tt>
:0:0:227:298
../image1.ppm:0:0:227:149
../image2.ppm:0:149:227:149
</tt>
</pre>
<p>There is a line for each component image and one for the composite.
<p>The 5 fields on each line are:
<ol>
<li>source image name (or null string indicating the line for the composite
image)
<li>Column number of upper left corner of the image
<li>Row number of upper left corner of the image
<li>width of the image (columns)
<li>height of the image (rows)
</ol>
<p>This option was new in Netpbm 10.6 (July 2002).
<dt><b>-header=</b><i>filename</i>
<dd>Tells <b>pnmmontage</b> to write a C header file of the locations
of the original images within the packed image. Each original image
generates four #defines within the packed file: xxxX, xxxY, xxxSZX,
and xxxSZY, where xxx is the name of the file, converted to all
uppercase. The output also includes #defines OVERALLX and OVERALLY, which
specifies the total size of the montage image.
<p>Here is an example:
<pre>
<tt>
#define OVERALLX 227
#define OVERALLY 298
#define X 0
#define Y 0
#define SZX 227
#define SZY 149
#define X 0
#define Y 149
#define SZX 227
#define SZY 149
</tt>
</pre>
<dt><b>-prefix</b>
<dd>Tells <b>pnmmontage</b> to use the specified prefix on all of the
#defines it generates.
<dt><b>-quality</b>
<dd>Before attempting to place the subimages, <b>pnmmontage</b> will
calculate a minimum possible area for the montage; this is either the
total of the areas of all the subimages, or the width of the widest
subimage times the height of the tallest subimage, whichever is
greater. <b>pnmmontage</b> then initiates a problem-space search to
find the best packing; if it finds a solution that is (at least) as
good as the minimum area times the quality as a percent, it will break
out of the search. Thus, <b>-quality=100</b> will find the best possible
solution; however, it may take a very long time to do so. The default
is <b>-quality=200.</b>
<dt><b>-0</b>, <b>-1</b>, ... <b>-9</b>
<dd>These options control the quality at a higher level than
<b>-quality</b>; <b>-0</b> is the worst quality (pick the first
solution found), while <b>-9</b> is the best quality (perform an
exhaustive search of problem space for the absolute best packing).
The higher the number, the slower the computation. The default is
<b>-5</b>.
</dl>
<h2 id="notes">NOTES</h2>
<p>Using <b>-9</b> is very slow on all but the smallest image sets.
<p>The minimum area arrangement is often not a convenient shape. For
example, it might be a tall, thin column of images, when you'd rather
have something more square. To force a minimum width or height, you
can include a strut image - a black image that wide and one pixel high.
Similarly, you can use a vertical strut to force a minimum height.
<h2 id="seealso">SEE ALSO</h2>
<b><a href="pnmcat.html">pnmcat</a></b>,
<b><a href="pnmindex.html">pnmindex</a></b>,
<b><a href="pnm.html">pnm</a></b>,
<b><a href="pam.html">pam</a></b>,
<b><a href="pbm.html">pbm</a></b>,
<b><a href="pgm.html">pgm</a></b>,
<b><a href="ppm.html">ppm</a></b>
<h2 id="history">HISTORY</h2>
<p><b>pnmmontage</b> was new in Netpbm 9.10 (January 2001).
<h2 id="author">AUTHOR</h2>
Copyright (C) 2000 by Ben Olmstead.
<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#notes">NOTES</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#history">HISTORY</a>
<li><a href="#author">AUTHOR</a>
</ul>
</body>
</html>
|