1Pamundice User Manual(0) Pamundice User Manual(0)
2
3
4
6 pamundice - combine grid of images (tiles) into one
7
8
10 $ pamdice myimage.ppm -outstem=myimage_part -width=10 -height=8
11 $ pamundice myimage_part_%1d_%1a.ppm -across=10 -down=8 >myimage.ppm
12
13 $ pamundice myimage.ppm myimage_part_%2a -across=13 -hoverlap=9
14
15
16
17
19 pamundice
20
21 [-across=n]
22
23 [-down=n]
24
25 [-hoverlap=pixels]
26
27 [-voverlap=pixels]
28
29 [-verbose]
30
31 {input_filename_pattern, -listfile=filename}
32
33 You can use the minimum unique abbreviation of the options. You can
34 use two hyphens instead of one. You can separate an option name from
35 its value with white space instead of an equals sign.
36
37
39 This program is part of Netpbm(1).
40
41 pamundice reads a bunch of Netpbm images as input and combines them as
42 a grid of tiles into a single output image of the same kind on Standard
43 Output.
44
45 You can optionally make the pieces overlap.
46
47 The images can either be in files whose names indicate where they go in
48 the
49 output (e.g. 'myimage_part_03_04' could be the image for Row 3,
50 Column 4 - see the input_filename_pattern argument) or listed in a
51 file, with a -listfile option.
52
53 The input images must all have the same format (PAM, PPM, etc.) and
54 maxval and for PAM must have the same depth and tuple type. All the
55 images in a rank (horizontal row of tiles) must have the same height.
56 All the images in a file (vertical column of tiles) must have the same
57 width. But it is not required that every rank have the same height or
58 every file have the same width.
59
60 pamdice is the inverse of pamundice. You can use pamundice to reassem‐
61 ble an image sliced up by pamdice. You can use pamdice to recreate the
62 tiles of an image created by pamundice, but to do this, the original
63 ranks must all have been the same height except for the bottom one and
64 the original files must all have been the same width except the right
65 one.
66
67 One use for this is to process an image in pieces when the whole image
68 is too large to process. For example, you might have an image so large
69 that an image editor can't read it all into memory or processes it very
70 slowly. You can split it into smaller pieces with pamdice, edit one at
71 a time, and then reassemble them with pamundice.
72
73 Of course, you can also use pamundice to compose various kinds of
74 checkerboard images, for example, you could write a program to render a
75 chessboard by computing an image of each square, then using pamundice
76 to assemble them into a board.
77
78
79 An alternative to join images in a single direction (i.e. a single rank
80 or a single file) is pnmcat. pnmcat gives you more flexibility than
81 pamundice in identifying the input images: you can supply them on Stan‐
82 dard Input or as a list of arbitrarily named files.
83
84 To join piecewise photographs, use pnmstitch instead of pamundice, be‐
85 cause it figures out where the pieces overlap, even if they don't over‐
86 lap exactly vertically or horizontally.
87
88 To create an image of the same tile repeated in a grid, that's pnmtile.
89
90 pnmindex does a similar thing to pamundice: it combines a bunch of
91 small images in a grid into a big one. But its purpose is to produce a
92 an index image of the input images. So it leaves space between them
93 and has labels for them, for example.
94
95
96
98 Unless you use a -listfile option,, there is one non-option argument,
99 and it is mandatory: input_filename_pattern. This tells pamundice what
100 files contain the input tiles.
101
102 pamundice reads the input images from files which are named with a pat‐
103 tern that indicates their positions in the combined image. For exam‐
104 ple, tile_00_05.ppm could be the 6th tile over in the 1st rank, while
105 tile_04_01 is the 2nd tile over in the 5th rank.
106
107 You cannot supply any of the data on Standard Input, and the files must
108 be the kind that pamundice can close and reopen and read the same image
109 a second time (e.g. a regular file is fine; a named pipe is probably
110 not).
111
112 input_filename_pattern is a printf-style pattern. (See the standard C
113 library printf subroutine). For the example above, it would be
114 tile_%2d_%2a.ppm. The only possible conversion specifiers are:
115
116
117
118
119 d "down": The rank (row) number, starting with 0.
120
121
122 a "across": The file (column) number, starting with 0.
123
124
125 % The per cent character (%).
126
127
128
129 The number between the % and the conversion specifier is the precision
130 and is required. It says how many characters of the file name are de‐
131 scribed by that conversion. The rank or file number is filled with
132 leading zeroes as necessary.
133
134 So the example tile_%2d_%2a.ppm means to get the name of the file that
135 contains the tile at Rank 0, File 5, you:
136
137
138
139
140 • replace the "%2d" with the rank number, as a 2 digit decimal
141 number: "00"
142
143
144 • Replace the "%2a" with the file number, as a 2 digit decimal
145 number: "05"
146
147
148 Note that this pattern describes file names that pamdice produces, ex‐
149 cept that the precision may be more or less. (pamdice uses however
150 many digits are required for the highest numbered image).
151
152
153
155 In addition to the options common to all programs based on libnetpbm
156 (most notably -quiet, see
157 Common Options ⟨index.html#commonoptions⟩ ), pamundice recognizes the
158 following command line options:
159
160
161
162 -across=N
163 This is the number of tiles across in the grid, i.e. the number
164 of tiles in each rank, or the number of files.
165
166 Default is 1.
167
168
169
170 -down=N
171 This is the number of tiles up and down in the grid, i.e. the
172 number of tiles in each file, or the number of ranks.
173
174 Default is 1.
175
176
177 -hoverlap=pixels
178 This is the amount in pixels to overlap the tiles horizontally.
179 pamundice clips this much off the right edge of every tile be‐
180 fore joining it to the adjacent image to the right. The tiles
181 along the right edge remain whole.
182
183 There must not be any input image narrower than this.
184
185 Note that this undoes the effect of the same -hoverlap option of
186 pamdice.
187
188 Default is zero -- no overlap.
189
190
191 -voverlap=pixels
192 This is analogous to -hoverlap, but pamundice clips the bottom
193 edge of each image before joining it to the one below.
194
195
196 -listfile=filename
197 This option names a file that contains the names of all the in‐
198 put files. This is an alternative to specifying a file name
199 pattern as an argument.
200
201 The named file contains file name, one per line. Each file con‐
202 tains the
203 image for one tile, in row-major order, top to bottom, left to
204 right. So
205 the first file is the upper left tile, the second is the one
206 to right of
207 that, etc. The number of lines in the file must be equal to
208 the number of
209 tiles in the output, the product of the -across and -down
210 values.
211
212 The file names have no meaning to pamundice. You can use the
213 same
214 file multiple times to have identical tiles in the output.
215
216 This option was new in Netpbm 10.90 (March 2020).
217
218
219 -verbose
220 Print information about the processing to Standard Error.
221
222
223
224
226 pamundice was new in Netpbm 10.39 (June 2007). Before that, pnmcat is
227 the best substitute.
228
229
230
232 pamdice(1), pnmcat(1), pnmindex(1), pnmtile(1), pnm(1) pam(1)
233
235 This manual page was generated by the Netpbm tool 'makeman' from HTML
236 source. The master documentation is at
237
238 http://netpbm.sourceforge.net/doc/pamundice.html
239
240netpbm documentation 26 April 2020 Pamundice User Manual(0)