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