1Pamundice User Manual(0)                              Pamundice User Manual(0)
2
3
4

NAME

6       pamundice - combine grid of images (tiles) into one
7
8

EXAMPLE

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

SYNOPSIS

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, -listfile=filename}
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

DESCRIPTION

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       The images can either be in files whose names indicate where they go in
47       the
48         output (e.g. 'myimage_part_03_04' could be the image for Row 3,
49         Column 4 - see the input_filename_pattern argument) or listed in a
50         file, with a -listfile option.
51
52       The input images must all have the same format (PAM,  PPM,  etc.)   and
53       maxval  and  for  PAM must have the same depth and tuple type.  All the
54       images in a rank (horizontal row of tiles) must have the  same  height.
55       All  the images in a file (vertical column of tiles) must have the same
56       width.  But it is not required that every rank have the same height  or
57       every file have the same width.
58
59       pamdice is the inverse of pamundice.  You can use pamundice to reassem‐
60       ble an image sliced up by pamdice.  You can use pamdice to recreate the
61       tiles  of  an  image created by pamundice, but to do this, the original
62       ranks must all have been the same height except for the bottom one  and
63       the  original  files must all have been the same width except the right
64       one.
65
66       One use for this is to process an image in pieces when the whole  image
67       is too large to process.  For example, you might have an image so large
68       that an image editor can't read it all into memory or processes it very
69       slowly.  You can split it into smaller pieces with pamdice, edit one at
70       a time, and then reassemble them with pamundice.
71
72       Of course, you can also use  pamundice  to  compose  various  kinds  of
73       checkerboard images, for example, you could write a program to render a
74       chessboard by computing an image of each square, then  using  pamundice
75       to assemble them into a board.
76
77
78       An alternative to join images in a single direction (i.e. a single rank
79       or a single file) is pnmcat.  pnmcat gives you  more  flexibility  than
80       pamundice in identifying the input images: you can supply them on Stan‐
81       dard Input or as a list of arbitrarily named files.
82
83       To join piecewise photographs,  use  pnmstitch  instead  of  pamundice,
84       because  it  figures  out  where the pieces overlap, even if they don't
85       overlap exactly vertically or horizontally.
86
87       To create an image of the same tile repeated in a grid, that's pnmtile.
88
89       pnmindex does a similar thing to pamundice:  it  combines  a  bunch  of
90       small images in a grid into a big one.  But its purpose is to produce a
91       an index image of the input images.  So it leaves  space  between  them
92       and has labels for them, for example.
93
94
95

ARGUMENTS

97       Unless  you  use a -listfile option,, there is one non-option argument,
98       and it is mandatory: input_filename_pattern.  This tells pamundice what
99       files contain the input tiles.
100
101       pamundice reads the input images from files which are named with a pat‐
102       tern that indicates their positions in the combined image.   For  exam‐
103       ple,  tile_00_05.ppm  could be the 6th tile over in the 1st rank, while
104       tile_04_01 is the 2nd tile over in the 5th rank.
105
106       You cannot supply any of the data on Standard Input, and the files must
107       be the kind that pamundice can close and reopen and read the same image
108       a second time (e.g. a regular file is fine; a named  pipe  is  probably
109       not).
110
111       input_filename_pattern  is a printf-style pattern.  (See the standard C
112       library printf  subroutine).   For  the  example  above,  it  would  be
113       tile_%2d_%2a.ppm.  The only possible conversion specifiers are:
114
115
116
117
118       d      "down": The rank (row) number, starting with 0.
119
120
121       a      "across": The file (column) number, starting with 0.
122
123
124       %      The per cent character (%).
125
126
127
128       The  number between the % and the conversion specifier is the precision
129       and is required.  It says how many characters  of  the  file  name  are
130       described  by  that conversion.  The rank or file number is filled with
131       leading zeroes as necessary.
132
133       So the example tile_%2d_%2a.ppm means to get the name of the file  that
134       contains the tile at Rank 0, File 5, you:
135
136
137
138
139       ·      replace  the  "%2d"  with  the rank number, as a 2 digit decimal
140              number: "00"
141
142
143       ·      Replace the "%2a" with the file number, as  a  2  digit  decimal
144              number: "05"
145
146
147       Note  that  this  pattern  describes  file names that pamdice produces,
148       except that the precision may be more or less.  (pamdice  uses  however
149       many digits are required for the highest numbered image).
150
151
152

OPTIONS

154       In  addition  to  the options common to all programs based on libnetpbm
155       (most notably -quiet, see
156        Common Options ⟨index.html#commonoptions⟩ ), pamundice recognizes  the
157       following command line options:
158
159
160
161       -across=N
162              This  is the number of tiles across in the grid, i.e. the number
163              of tiles in each rank, or the number of files.
164
165              Default is 1.
166
167
168
169       -down=N
170              This is the number of tiles up and down in the  grid,  i.e.  the
171              number of tiles in each file, or the number of ranks.
172
173              Default is 1.
174
175
176       -hoverlap=pixels
177              This  is the amount in pixels to overlap the tiles horizontally.
178              pamundice clips this much off  the  right  edge  of  every  tile
179              before joining it to the adjacent image to the right.  The tiles
180              along the right edge remain whole.
181
182              There must not be any input image narrower than this.
183
184              Note that this undoes the effect of the same -hoverlap option of
185              pamdice.
186
187              Default is zero -- no overlap.
188
189
190       -voverlap=pixels
191              This  is  analogous to -hoverlap, but pamundice clips the bottom
192              edge of each image before joining it to the one below.
193
194
195       -listfile=filename
196              This option names a file that contains  the  names  of  all  the
197              input  files.   This is an alternative to specifying a file name
198              pattern as an argument.
199
200              The named file contains file name, one per line.  Each file con‐
201              tains the
202                image for one tile, in row-major order, top to bottom, left to
203              right.  So
204                the first file is the upper left tile, the second is  the  one
205              to right of
206                that,  etc.   The number of lines in the file must be equal to
207              the number of
208                tiles in the output, the product of the -across and -down
209                values.
210
211              The file names have no meaning to pamundice.  You  can  use  the
212              same
213                file multiple times to have identical tiles in the output.
214
215              This option was new in Netpbm 10.90 (March 2020).
216
217
218       -verbose
219              Print information about the processing to Standard Error.
220
221
222
223

HISTORY

225       pamundice  was new in Netpbm 10.39 (June 2007).  Before that, pnmcat is
226       the best substitute.
227
228
229

SEE ALSO

231       pamdice(1), pnmcat(1), pnmindex(1), pnmtile(1), pnm(1) pam(1)
232

DOCUMENT SOURCE

234       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
235       source.  The master documentation is at
236
237              http://netpbm.sourceforge.net/doc/pamundice.html
238
239netpbm documentation             26 April 2020        Pamundice User Manual(0)
Impressum