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