Debian Codegraph @

userguide/pnmmontage.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
2 <html><head><title>Pnmmontage User Manual</title></head>
3 <body>
4 <h1>pnmmontage</h1>
5 Updated: 22 November 2012
6 <br>
7 <a href="#index">Table Of Contents</a>
8
9 <h2>NAME</h2>
10 pnmmontage - create a montage of PNM images
11
12 <h2 id="synopsis">SYNOPSIS</h2>
13
14 <b>pnmmontage</b>
15
16 [<b>-header=</b><i>headerfile</i>]
17
18 [<b>-quality=</b><i>n</i>]
19
20 [<b>-prefix=</b><i>prefix</i>]
21
22 [<b>-0</b>|<b>-1</b>|<b>-2</b>|<b>...</b>|<b>-9</b>]
23
24 [<b>-data=</b><i>filename</i>]
25
26 <i>pnmfile</i>...
27
28 <h2 id="description">DESCRIPTION</h2>
29
30 <p>This program is part of <a href="index.html">Netpbm</a>.
31
32 <p><b>pnmmontage</b> packs images of differing sizes into a minimum-area
33 composite image.
34
35 <p>Areas of the output that cannot be occupied by an image are black.
36
37
38 <h2 id="options">OPTIONS</h2>
39
40 <p>In addition to the options common to all programs based on libnetpbm
41 (most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
42 Common Options</a>), <b>pnmmontage</b> recognizes the following
43 command line options:
44
45 <dl compact>
46
47 <dt><b>-data=</b><i>filename</i>
48
49 <dd>This option causes <b>pnmmontage</b> to write a file that describes
50 in machine-readable form the positions of the original images within
51 the packed image. Here is an example:
52
53 <pre>
54 <span style="font-family: monospace">
55 :0:0:227:298
56 ../image1.ppm:0:0:227:149
57 ../image2.ppm:0:149:227:149
58 </span>
59 </pre>
60
61
62 <p>There is a line for each component image and one for the composite.
63
64 <p>The 5 fields on each line are:
65
66 <ol>
67 <li>source image name (or null string indicating the line for the composite
68 image)
69 <li>Column number of upper left corner of the image
70 <li>Row number of upper left corner of the image
71 <li>width of the image (columns)
72 <li>height of the image (rows)
73 </ol>
74
75 <p>This option was new in Netpbm 10.6 (July 2002).
76
77 <dt><b>-header=</b><i>filename</i>
78
79 <dd>Tells <b>pnmmontage</b> to write a C header file of the locations
80 of the original images within the packed image. Each original image
81 generates four #defines within the packed file: xxxX, xxxY, xxxSZX,
82 and xxxSZY, where xxx is the name of the file, converted to all
83 uppercase. The output also includes #defines OVERALLX and OVERALLY, which
84 specifies the total size of the montage image.
85
86 <p>Here is an example:
87
88 <pre>
89 <code>
90 #define OVERALLX 227
91 #define OVERALLY 298
92
93 #define X 0
94 #define Y 0
95 #define SZX 227
96 #define SZY 149
97
98 #define X 0
99 #define Y 149
100 #define SZX 227
101 #define SZY 149
102 </code>
103 </pre>
104
105 <dt><b>-prefix</b>
106
107 <dd>Tells <b>pnmmontage</b> to use the specified prefix on all of the
108 #defines it generates.
109
110 <dt><b>-quality</b>
111
112 <dd>Before attempting to place the subimages, <b>pnmmontage</b> will
113 calculate a minimum possible area for the montage; this is either the
114 total of the areas of all the subimages, or the width of the widest
115 subimage times the height of the tallest subimage, whichever is
116 greater. <b>pnmmontage</b> then initiates a problem-space search to
117 find the best packing; if it finds a solution that is (at least) as
118 good as the minimum area times the quality as a percent, it will break
119 out of the search. Thus, <b>-quality=100</b> will find the best possible
120 solution; however, it may take a very long time to do so. The default
121 is <b>-quality=200.</b>
122
123 <dt><b>-0</b>, <b>-1</b>, ... <b>-9</b>
124
125 <dd>These options control the quality at a higher level than
126 <b>-quality</b>; <b>-0</b> is the worst quality (pick the first
127 solution found), while <b>-9</b> is the best quality (perform an
128 exhaustive search of problem space for the absolute best packing).
129 The higher the number, the slower the computation. The default is
130 <b>-5</b>.
131
132 </dl>
133
134
135 <h2 id="notes">NOTES</h2>
136
137 <p>Using <b>-9</b> is very slow on all but the smallest image sets.
138
139 <p>The minimum area arrangement is often not a convenient shape. For
140 example, it might be a tall, thin column of images, when you'd rather
141 have something more square. To force a minimum width or height, you
142 can include a strut image - a black image that wide and one pixel high.
143 Similarly, you can use a vertical strut to force a minimum height.
144
145
146 <h2 id="seealso">SEE ALSO</h2>
147
148 <b><a href="pamcat.html">pamcat</a></b>,
149
150 <b><a href="pnmindex.html">pnmindex</a></b>,
151
152 <b><a href="pnm.html">pnm</a></b>,
153
154 <b><a href="pam.html">pam</a></b>,
155
156 <b><a href="pbm.html">pbm</a></b>,
157
158 <b><a href="pgm.html">pgm</a></b>,
159
160 <b><a href="ppm.html">ppm</a></b>
161
162 <h2 id="history">HISTORY</h2>
163
164 <p><b>pnmmontage</b> was new in Netpbm 9.10 (January 2001).
165
166
167 <h2 id="author">AUTHOR</h2>
168
169 Copyright (C) 2000 by Ben Olmstead.
170
171 <hr>
172 <h2 id="index">Table Of Contents</h2>
173 <ul>
174 <li><a href="#synopsis">SYNOPSIS</a>
175 <li><a href="#description">DESCRIPTION</a>
176 <li><a href="#options">OPTIONS</a>
177 <li><a href="#notes">NOTES</a>
178 <li><a href="#seealso">SEE ALSO</a>
179 <li><a href="#history">HISTORY</a>
180 <li><a href="#author">AUTHOR</a>
181 </ul>
182 </body>
183 </html>