File: montage.1

package info (click to toggle)
imagemagick 6%3A6.0.6.2-2.9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 33,284 kB
  • ctags: 14,844
  • sloc: ansic: 190,790; cpp: 17,203; sh: 8,740; perl: 4,190; makefile: 1,740; tcl: 459
file content (580 lines) | stat: -rw-r--r-- 18,541 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
.TH montage 1 "Date: 2004/01/01 01:00:00" "ImageMagick"
.SH MONTAGE
.SH NAME

montage - create a composite image by combining several separate images

.SH SYNOPSIS

\fBmontage\fP \fB[\fP \fIoptions\fP \fB...]\fP \fIfile\fP \fB[ [\fP
\fIoptions\fP \fB...]\fP \fIfile\fP \fB...]\fP \fIoutput_file\fP

.SH DESCRIPTION

\fBmontage\fP creates a composite image by combining several separate
images. The images are tiled on the composite image with the name of the
image optionally appearing just below the individual tile.

The composite image is constructed in the following manner. First, each
image specified on the command line, except for the last, is scaled to
fit the maximum tile size. The maximum tile size by default is 120x120.
It can be modified with the \fB-geometry\fP command line argument or X
resource. See
\fBOptions\fP
for more information on command line arguments. See
\fBX(1)\fP for more information on X resources.
Note that the maximum tile size need not be a square.

Next the composite image is initialized with the color specified by the
\fB-background\fP
command line argument or X resource. The width and height of the composite
image is determined by the title specified, the maximum tile size, the
number of tiles per row, the tile border width and height, the image border
width, and the label height. The number of tiles per row specifies how
many images are to appear in each row of the composite image. The default
is to have 5 tiles in each row and 4 tiles in each column of the composite.
A specific value is specified with \fB-tile\fP. The tile border width
and height, and the image border width defaults to the value of the X resource
\fB-borderwidth\fP. It can be changed with the \fB-borderwidth\fP or
\fB-geometry\fP command line argument or X resource. The label height
is determined by the font you specify with the \fB-font\fP command line
argument or X resource. If you do not specify a font, a font is chosen
that allows the name of the image to fit the maximum width of a tiled area.
The label colors is determined by the \fB-background\fP and \fB-fill\fP
command line argument or X resource. Note, that if the background and pen
colors are the same, labels will not appear.

Initially, the composite image title is placed at the top if one is specified
(refer to \fB-fill\fP). Next, each image is set onto the composite image,
surrounded by its border color, with its name centered just below it. The
individual images are left-justified within the width of the tiled area.
The order of the images is the same as they appear on the command line
unless the images have a scene keyword. If a scene number is specified
in each image, then the images are tiled onto the composite in the order
of their scene number. Finally, the last argument on the command line is
the name assigned to the composite image. By default, the image is written
in the \fBMIFF\fP format and can be viewed or printed with
\fIdisplay(1)\fP.


Note, that if the number of tiles exceeds the default number of 20 (6 per
row, 4 per column), more than one composite image is created. To ensure
a single image is produced, use \fB-tile\fP to increase the number of
tiles to meet or exceed the number of input images.

Finally, to create one or more empty spaces in the sequence of tiles, use
the \fB"NULL:"\fP image format.

Note, a composite MIFF image displayed to an X server with
\fBdisplay\fP
behaves differently than other images. You can think of the composite as
a visual image directory. Choose a particular tile of the composite and
press a button to display it. See \fBdisplay(1)\fP and \fBmiff(5)\fP
.SH EXAMPLES

To create a montage of a cockatoo, a parrot, and a hummingbird and write
it to a file called birds, use:

    montage cockatoo.miff parrot.miff hummingbird.miff
            birds.miff

To tile several bird images so that they are at most 256 pixels in width
and 192 pixels in height, surrounded by a red border, and separated by
10 pixels of background color, use:

    montage -geometry 256x192+10+10 -bordercolor red
            birds.* montage.miff

To create an unlabeled parrot image, 640 by 480 pixels, and surrounded
by a border of black, use:

    montage -geometry 640x480 -bordercolor black
            -label "" parrot.miff bird.miff

To create an image of an eagle with a textured background, use:

    montage -texture bumps.jpg eagle.jpg eagle.png

To join several GIF images together without any extraneous graphics (e.g.
no label, no shadowing, no surrounding tile frame), use:

    montage +frame +shadow +label -tile 5x1
            -geometry 50x50+0+0 *.png joined.png
.SH OPTIONS

Any option you specify on the command line remains in effect for the group
of images following it, until the group is terminated by the appearance of
any option or \fB-noop\fP.  For example, to make a montage of three images,
the first with 32 colors, the second with an unlimited number of colors, and
the third with only 16 colors, use:


     montage -colors 32 cockatoo.1 -noop cockatoo.2
             -colors 16 cockatoo.3 cockatoos.miff

For a more detailed description of each option, see
Options, above.
\fIImageMagick(1)\fP.

.TP
.B "-adjoin"
\fRjoin images into a single multi-image file
.TP
.B "-authenticate \fI<string>"\fP
\fRdecrypt image with this password
.TP
.B "-background \fI<color>"\fP
\fRthe background color
.TP
.B "-blue-primary \fI<x>,<y>"\fP
\fRblue chromaticity primary point
.TP
.B "-blur \fI<radius>{x<sigma>}"\fP
\fRblur the image with a Gaussian operator
.TP
.B "-bordercolor \fI<color>"\fP
\fRthe border color
.TP
.B "-borderwidth \fI<geometry>"\fP
\fRthe border width
.TP
.B "-cache \fI<threshold>"\fP
\fR(This option has been replaced by the -limit option)
.TP
.B "-chop \fI<width>x<height>{+-}<x>{+-}<y>{%}"\fP
\fRremove pixels from the interior of an image
.TP
.B "-colors \fI<value>"\fP
\fRpreferred number of colors in the image
.TP
.B "-colorspace \fI<value>"\fP
\fRthe type of colorspace
.TP
.B "-comment \fI<string>"\fP
\fRannotate an image with a comment
.TP
.B "-compose \fI<operator>"\fP
\fRthe type of image composition
.TP
.B "-compress \fI<type>"\fP
\fRthe type of image compression
.TP
.B "-crop \fI<width>x<height>{+-}<x>{+-}<y>{%}"\fP
\fRpreferred size and location of the cropped image
.TP
.B "-debug \fI<events>"\fP
\fRenable debug printout
.TP
.B "-define \fI<key>{=<value>},..."\fP
\fRadd coder/decoder specific options
.TP
.B "-delete \fI<index>"\fP
\fRdelete the image from the image sequence
.TP
.B "-density \fI<width>x<height>"\fP
\fRhorizontal and vertical resolution in pixels of the image
.TP
.B "-depth \fI<value>"\fP
\fRdepth of the image
.TP
.B "-display \fI<host:display[.screen]>"\fP
\fRspecifies the X server to contact
.TP
.B "-dispose \fI<method>"\fP
\fRGIF disposal method
.TP
.B "-dither"
\fRapply Floyd/Steinberg error diffusion to the image
.TP
.B "-draw \fI<string>"\fP
\fRannotate an image with one or more graphic primitives
.TP
.B "-encoding \fI<type>"\fP
\fRspecify the text encoding
.TP
.B "-endian \fI<type>"\fP
\fRspecify endianness (MSB or LSB) of output image
.TP
.B "-fill \fI<color>"\fP
\fRcolor to use when filling a graphic primitive
.TP
.B "-filter \fI<type>"\fP
\fRuse this type of filter when resizing an image
.TP
.B "-font \fI<name>"\fP
\fRuse this font when annotating the image with text
.TP
.B "-frame \fI<width>x<height>+<outer bevel width>+<inner bevel width>"\fP
\fRsurround the image with an ornamental border
.TP
.B "-gamma \fI<value>"\fP
\fRlevel of gamma correction
.TP
.B "-geometry \fI<width>x<height>{+-}<x>{+-}<y>{%}{@} {!}{<}{>}"\fP
\fRpreferred size and location of the Image window.
.TP
.B "-gravity \fI<type>"\fP
\fRdirection primitive  gravitates to when annotating the image.
.TP
.B "-green-primary \fI<x>,<y>"\fP
\fRgreen chromaticity primary point
.TP
.B "-help"
\fRprint usage instructions
.TP
.B "-insert \fI<index>"\fP
\fRinsert last image into the image sequence
.TP
.B "-interlace \fI<type>"\fP
\fRthe type of interlacing scheme
.TP
.B "-label \fI<name>"\fP
\fRassign a label to an image
.TP
.B "-limit \fI<type> <value>"\fP
\fRArea, Disk, File, Map, or Memory resource limit
.TP
.B "-log \fI<string>"\fP
\fRSpecify format for debug log
.TP
.B "-matte"
\fRstore matte channel if the image has one
.TP
.B "-mattecolor \fI<color>"\fP
\fRspecify the color to be used with the \fB-frame\fP option
.TP
.B "-mode \fI<value>"\fP
\fRmode of operation
.TP
.B "-monochrome"
\fRtransform the image to black and white
.TP
.B "-page \fI<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}"\fP
\fRsize and location of an image canvas
.TP
.B "-pen \fI<color>"\fP
\fR(This option has been replaced by the -fill option)
.TP
.B "-pointsize \fI<value>"\fP
\fRpointsize of the PostScript, OPTION1, or TrueType font
.TP
.B "-profile \fI<filename>"\fP
\fRadd ICM, IPTC, or generic profile  to image
.TP
.B "-quality \fI<value>"\fP
\fRJPEG/MIFF/PNG compression level
.TP
.B "-radial-blur \fIangle"\fP
\fRradial blur the image
.TP
.B "-red-primary \fI<x>,<y>"\fP
\fRred chromaticity primary point
.TP
.B "-render"
\fRrender vector operations
.TP
.B "-resize \fI<width>x<height>{%}{@}{!}{<}{>}"\fP
\fRresize an image
.TP
.B "-rotate \fI<degrees>{<}{>}"\fP
\fRapply Paeth image rotation to the image
.TP
.B "-sampling-factor \fI<horizontal_factor>x<vertical_factor>"\fP
\fRsampling factors used by JPEG or MPEG-2 encoder and YUV decoder/encoder.
.TP
.B "-scenes \fI<value-value>"\fP
\fRrange of image scene numbers to read
.TP
.B "-shadow \fI<radius>{x<sigma>}"\fP
\fRshadow the montage
.TP
.B "-sharpen \fI<radius>{x<sigma>}"\fP
\fRsharpen the image
.TP
.B "-size \fI<width>x<height>{+offset}"\fP
\fRwidth and height of the image
.TP
.B "-strip \fI"\fP
\fRstrip the image of any profiles or comments
.TP
.B "-stroke \fI<color>"\fP
\fRcolor to use when stroking a graphic primitive
.TP
.B "-strokewidth \fI<value>"\fP
\fRset the stroke width
.TP
.B "-swap \fI<index,index>"\fP
\fRswap two images in the image sequence
.TP
.B "-texture \fI<filename>"\fP
\fRname of texture to tile onto the image background
.TP
.B "-thumbnail \fI<width>x<height>{%}{@}{!}{<}{>}"\fP
\fRcreate a thumbnail of the image
.TP
.B "-tile \fI<geometry>"\fP
\fRlayout of images [\fImontage\fP]
.TP
.B "-title \fI<string>"\fP
\fRassign title to displayed image [\fIanimate, display, montage\fP]
.TP
.B "-transparent \fI<color>"\fP
\fRmake this color transparent within the image
.TP
.B "-treedepth \fI<value>"\fP
\fRtree depth for the color reduction algorithm
.TP
.B "-trim"
\fRtrim an image
.TP
.B "-type \fI<type>"\fP
\fRthe image type
.TP
.B "-verbose"
\fRprint detailed information about the image
.TP
.B "-version"
\fRprint ImageMagick version string
.TP
.B "-white-point \fI<x>,<y>"\fP
\fRchromaticity white point

For a more detailed description of each option, see
Options, above.
\fIImageMagick(1)\fP.

.SH X RESOURCES

\fBMontage\fP options can appear on the command line or in your X resource
file. Options on the command line supersede values specified in your X
resource file. See \fBX(1)\fP for more information on X resources.

All \fBmontage\fP options have a corresponding X resource. In addition,
\fBmontage\fP
uses the following X resources:
.TP
.B "background \fI(class Background)"\fP
\fRbackground color

Specifies the preferred color to use for the composite image background.
The default is #ccc.
.TP
.B "borderColor \fI(class BorderColor)"\fP
\fRborder color

Specifies the preferred color to use for the composite image border. The
default is #ccc.
.TP
.B "borderWidth \fI(class BorderWidth)"\fP
\fRborder width

Specifies the width in pixels of the composite image border. The default
is 2.
.TP
.B "font \fI(class Font)"\fP
\fRfont to use

Specifies the name of the preferred font to use when displaying text within
the composite image. The default is 9x15, fixed, or 5x8 determined by the
composite image size.
.TP
.B "matteColor \fI(class MatteColor)"\fP
\fRcolor of the frame

Specify the color of an image frame. A 3D effect is achieved by using highlight
and shadow colors derived from this color. The default value is #697B8F.
.TP
.B "pen \fI(class Pen)"\fP
\fRtext color

Specifies the preferred color to use for text within the composite image.
The default is black.
.TP
.B "title \fI(class Title)"\fP
\fRcomposite image title

This resource specifies the title to be placed at the top of the composite
image. The default is not to place a title at the top of the composite
image.
.SH ENVIRONMENT
.TP
.B "COLUMNS"
\fROutput screen width. Used when formatting text for the screen. Many
Unix systems keep this shell variable up to date, but it may need to be
explicitly exported in order for ImageMagick to see it.
.TP
.B "DISPLAY"
\fRX11 display ID (host, display number, and screen in the form
hostname:display.screen).
.TP
.B "HOME"
\fRLocation of user's home directory. ImageMagick searches for
configuration files in $HOME/.magick if the directory exists. See
\fBMAGICK_CODER_MODULE_PATH\fP, \fBMAGICK_CONFIGURE_PATH\fP, and
\fBMAGICK_FILTER_MODULE_PATH\fP if more flexibility is needed.
.TP
.B "MAGICK_CODER_MODULE_PATH"
\fRSearch path to use when searching for image format coder modules.
This path allows the user to arbitrarily extend the image formats
supported by ImageMagick by adding loadable modules to an arbitrary
location rather than copying them into the ImageMagick installation
directory. The formatting of the search path is similar to operating
system search paths (i.e. colon delimited for Unix, and semi-colon
delimited for Microsoft Windows). This user specified search path is used
before trying the default search path.
.TP
.B "MAGICK_CONFIGURE_PATH"
\fRSearch path to use when searching for configuration (.mgk) files.
The formatting of the search path is similar to operating system search
paths (i.e. colon delimited for Unix, and semi-colon delimited for
Microsoft Windows). This user specified search path is used before trying
the default search path.
.TP
.B "MAGICK_DEBUG"
\fRDebug options (see \fB-debug\fP for details)
.TP
.B "MAGICK_FILTER_MODULE_PATH"
\fRSearch path to use when searching for filter process modules
(invoked via \fB-process\fP). This path allows the user to arbitrarily
extend ImageMagick's image processing functionality by adding loadable
modules to an arbitrary location rather than copying them into the
ImageMagick installation directory. The formatting of the search path
is similar to operating system search paths (i.e. colon delimited for
Unix, and semi-colon delimited for Microsoft Windows). This user
specified search path is used before trying the default search path.
.TP
.B "MAGICK_FONT_PATH"
\fRDirectory where ImageMagick should look for TrueType and
Postscript Type1 font files if the font file is not found in the current
directory. It is preferred to define the available fonts via type.mgk
rather than use \fBMAGICK_FONT_PATH\fP.
.TP
.B "MAGICK_HOME"
\fRPath to top of ImageMagick installation directory. Only observed
by "uninstalled" builds of ImageMagick which do not have their location
hard-coded or set by an installer.
.TP
.B "MAGICK_DISK_LIMIT"
\fRMaximum amount of disk space allowed for use by the pixel cache.
.TP
.B "MAGICK_FILES_LIMIT"
\fRMaximum number of open files.
.TP
.B "MAGICK_MAP_LIMIT"
\fRMaximum size of a memory map.
.TP
.B "MAGICK_MEMORY_LIMIT"
\fRMaximum amount of memory to allocate from the heap.
.TP
.B "MAGICK_TMPDIR"
\fRPath to directory where ImageMagick should write temporary
files. The default is to use the system default, or the location set by
\fBTMPDIR\fP.
.TP
.B "TMPDIR"
\fRFor POSIX-compatible systems (Unix-compatible), the path to the
directory where all applications should write temporary files.
Overridden by \fBMAGICK_TMPDIR\fP if it is set.
.TP
.B "TMP \fIor TEMP"\fP
\fRFor Microsoft Windows, the path to the directory where applications
should write temporary files. Overridden by \fBMAGICK_TMPDIR\fP if it
is set.
.SH CONFIGURATION FILES
ImageMagick uses a number of XML format configuration files:
.TP
.B "colors.mgk"
\fRcolors configuration file

  <?xml version="1.0"?>
  <colormap>
    <color name="AliceBlue" red="240" green="248" blue="255"
           compliance="SVG, X11, XPM" />
  </colormap>
.TP
.B "delegates.mgk"
\fRdelegates configuration file
.TP
.B "log.mgk"
\fRlogging configuration file

  <?xml version="1.0"?>
  <magicklog>
    <log events="None" />
    <log output="stdout" />
    <log filename="Magick-%d.log" />
    <log generations="3" />
    <log limit="2000" />
    <log format="%t %r %u %p %m/%f/%l/%d:\\n  %e"  />
  </magicklog>
.TP
.B "magic.mgk"
\fRfile header magic test configuration file

  <?xml version="1.0"?>
  <magicmap>
    <magic name="AVI" offset="0" target="RIFF" />
  </magicmap>
.TP
.B "modules.mgk"
\fRloadable modules configuration file

  <?xml version="1.0"?>
  <modulemap>
    <module magick="8BIM" name="META" />
  </modulemap>
.TP
.B "type.mgk"
\fRmaster type (fonts) configuration file

  <?xml version="1.0"?>
  <typemap>
    <\fB\fPinclude file="type-windows.mgk" />
    <type
      name="AvantGarde-Book"
      fullname="AvantGarde Book"
      family="AvantGarde"
      foundry="URW"
      weight="400"
      style="normal"
      stretch="normal"
      format="type1"
      metrics="/usr/local/share/ghostscript/fonts/a010013l.afm"
      glyphs="/usr/local/share/ghostscript/fonts/a010013l.pfb"
    />
  </typemap>
.SH ACKNOWLEDGEMENTS

The \fBMIT X Consortium\fP for making network transparent graphics a reality.


\fIMichael Halle\fP, \fBSpatial Imaging Group at MIT\fP, for the initial
implementation of Alan Paeth's image rotation algorithm.


\fIDavid Pensak\fP, \fBE. I. du Pont de Nemours and Company\fP, for
providing a computing environment that made this program possible.


\fIPeder Langlo\fP, \fBHewlett Packard\fP, Norway, made hundreds of suggestions
and bug reports. Without Peder, this software would not be nearly
as useful as it is today.

\fIRod Bogart\fP and \fIJohn W. Peterson\fP, \fBUniversity of Utah\fP.
Image compositing is loosely based on rlecomp of the Utah Raster Toolkit.

\fIPaul Heckbert\fP, \fBCarnegie Mellon University\fP. Image resizing is
based on his Zoom program.

\fIPaul Raveling\fP, \fBUSC Information Sciences Institute\fP. The
spatial subdivision color reduction algorithm is based on his Img software.
.SH SEE ALSO

display(1), animate(1), import(1), mogrify(1), convert(1), composite(1),
ImageMagick(1)

.SH COPYRIGHT

\fBCopyright (C) 1999-2004 ImageMagick Studio LLC. Additional copyrights and
licenses apply to this software, see
http://www.imagemagick.org/www/Copyright.html\fP