]> granicus.if.org Git - imagemagick/blob - www/montage.html
...
[imagemagick] / www / montage.html
1
2
3
4
5 <!DOCTYPE html>
6 <html lang="en">
7 <head>
8   <meta charset="utf-8" />
9   <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
10   <meta http-equiv="x-ua-compatible" content="ie=edge" />
11   <title>Command-line Tools: Montage @ ImageMagick</title>
12   <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
13   <meta name="application-name" content="ImageMagick"/>
14   <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/>
15   <meta name="application-url" content="https://www.imagemagick.org"/>
16   <meta name="generator" content="PHP"/>
17   <meta name="keywords" content="command-line, tools:, montage, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
18   <meta name="rating" content="GENERAL"/>
19   <meta name="robots" content="INDEX, FOLLOW"/>
20   <meta name="generator" content="ImageMagick Studio LLC"/>
21   <meta name="author" content="ImageMagick Studio LLC"/>
22   <meta name="revisit-after" content="2 DAYS"/>
23   <meta name="resource-type" content="document"/>
24   <meta name="copyright" content="Copyright (c) 1999-2017 ImageMagick Studio LLC"/>
25   <meta name="distribution" content="Global"/>
26   <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
27   <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
28   <link rel="canonical" href="https://www.imagemagick.org/script/montage.html"/>
29   <link rel="icon" href="../images/wand.png"/>
30   <link rel="shortcut icon" href="../images/wand.ico"/>
31   <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:900,400,400italic,700,700italic,300,300italic|Open+Sans:300italic,400italic,700italic,300,400,600,700" />
32   <link rel="stylesheet" href="css/magick.css"/>
33 </head>
34 <body>
35 <div class="main">
36 <div class="magick-masthead">
37   <div class="container">
38     <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
39          style="display:block"
40          data-ad-client="ca-pub-3129977114552745"
41          data-ad-slot="6345125851"
42          data-ad-format="auto"></ins>
43     <script>
44       (adsbygoogle = window.adsbygoogle || []).push({});
45     </script>
46     <nav class="magick-nav">
47       <a class="magick-nav-item " href="../index.html">Home</a>
48       <a class="magick-nav-item " href="download.html">Download</a>
49       <a class="magick-nav-item " href="command-line-tools.html">Tools</a>
50       <a class="magick-nav-item " href="command-line-processing.html">Command-line</a>
51       <a class="magick-nav-item " href="resources.html">Resources</a>
52       <a class="magick-nav-item " href="develop.html">Develop</a>
53       <a class="magick-nav-item " href="https://www.imagemagick.org/script/search.php">Search</a>
54       <a class="magick-nav-item pull-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
55     </nav>
56   </div>
57 </div>
58 <div class="container">
59 <div class="magick-header">
60 <p class="text-center"><a href="montage.html#usage">Example Usage</a> • <a href="montage.html#options">Option Summary</a></p>
61
62 <p class="lead magick-description">Use the <code>montage</code> program to create a composite image by combining several separate images.  The images are tiled on the composite image optionally adorned with a border, frame, image name, and more. See <a href="command-line-processing.html">Command Line Processing</a> for advice on how to structure your <code>montage</code> command or see below for example usages of the command.</p>
63
64 <h2 class="magick-header"><a id="usage"></a>Example Usage</h2>
65
66 <p>We list a few examples of the <code>montage</code> command here to illustrate its usefulness and ease of use.  To get started, let's montage two images into a single composite:</p>
67
68 <pre>
69 montage -background '#336699' -geometry +4+4 rose.jpg red-ball.png montage.jpg
70 </pre>
71
72 <ul>
73   <a href="../images/rose.jpg">
74   <img style="margin-top:14px; margin-bottom:14px;" src="../images/rose.jpg" width="70" height="46" alt="rose" />
75   </a>
76   <a href="../images/red-ball.png">
77   <img style="margin-top:2px; margin-bottom:2px;" src="../images/red-ball.png" width="70" height="70" alt="red ball" />
78   </a>
79   <img style="margin-top:27px; margin-bottom:27px;" src="../images/right.gif" width="20" height="20" alt="==>" />
80   <a href="../images/montage.jpg">
81   <img src="../images/montage.jpg" width="148" height="74" alt="montage" />
82   </a>
83 </ul>
84
85 <p>Ok, let's add some decorations:</p>
86
87 <pre>
88 montage -label %f -frame 5 -background '#336699' -geometry +4+4 rose.jpg red-ball.png frame.jpg
89 </pre>
90
91 <ul>
92   <a href="../images/rose.jpg">
93   <img style="margin-top:31px; margin-bottom:31px;" src="../images/rose.jpg" width="70" height="46" alt="rose.jpg" />
94   </a>
95   <a href="../images/red-ball.png">
96   <img style="margin-top:19px; margin-bottom:19px;" src="../images/red-ball.png" width="70" height="70" alt="red ball" />
97   </a>
98         <img style="margin-top:44px; margin-bottom:44px;" src="../images/right.gif" width="20" height="20" alt="==>" />
99   <a href="../images/frame.jpg">
100   <img src="../images/frame.jpg" width="176" height="108" alt="frame" />
101   </a>
102 </ul>
103
104 <p>You can find additional examples of using <code>montage</code> at <a href="https://www.imagemagick.org/Usage/montage/">Examples of ImageMagick Usage</a> and <a href="http://www.ibm.com/developerworks/library/l-graf/?ca=dnt-428">Graphics from the Command Line</a>.  Further discussion is available in  <a href="http://www.ibm.com/developerworks/library/l-graf2/?ca=dgr-lnxw15GraphicsLine">More Graphics from the Command Line</a> and <a href="https://www.imagemagick.org/Usage/">Examples of ImageMagick Usage</a>.</p>
105
106 <h2 class="magick-header"><a id="options"></a>Option Summary</h2>
107
108 <p>The <code>montage</code> command recognizes these options.  Click on an option to get more details about how that option works.</p>
109
110 <table class="table table-condensed table-striped">
111   <tbody>
112   <tr>
113     <th align="left">Option</th>
114     <th align="left">Description</th>
115   </tr>
116
117   <tr>
118     <td><a href="command-line-options.html#adaptive-sharpen">-adaptive-sharpen <var>geometry</var></a></td>
119     <td>adaptively sharpen pixels; increase effect near edges</td>
120   </tr>
121
122   <tr>
123     <td><a href="command-line-options.html#adjoin">-adjoin</a></td>
124     <td>join images into a single multi-image file</td>
125   </tr>
126
127   <tr>
128     <td><a href="command-line-options.html#affine">-affine <var>matrix</var></a></td>
129     <td>affine transform matrix</td>
130   </tr>
131
132   <tr>
133     <td><a href="command-line-options.html#alpha">-alpha</a></td>
134     <td>on, activate, off, deactivate, set, opaque, copy",
135 transparent, extract, background, or shape the alpha channel</td>
136   </tr>
137
138   <tr>
139     <td><a href="command-line-options.html#annotate">-annotate <var>geometry text</var></a></td>
140     <td>annotate the image with text</td>
141   </tr>
142
143   <tr>
144     <td><a href="command-line-options.html#authenticate">-authenticate <var>value</var></a></td>
145     <td>decrypt image with this password</td>
146   </tr>
147
148   <tr>
149     <td><a href="command-line-options.html#auto-orient">-auto-orient</a></td>
150     <td>automagically orient image</td>
151   </tr>
152
153   <tr>
154     <td><a href="command-line-options.html#background">-background <var>color</var></a></td>
155     <td>background color</td>
156   </tr>
157
158   <tr>
159     <td><a href="command-line-options.html#blue-primary">-blue-primary <var>point</var></a></td>
160     <td>chromaticity blue primary point</td>
161   </tr>
162
163   <tr>
164     <td><a href="command-line-options.html#blur">-blur <var>geometry</var></a></td>
165     <td>reduce image noise and reduce detail levels</td>
166   </tr>
167
168   <tr>
169     <td><a href="command-line-options.html#border">-border <var>geometry</var></a></td>
170     <td>surround image with a border of color</td>
171   </tr>
172
173   <tr>
174     <td><a href="command-line-options.html#bordercolor">-bordercolor <var>color</var></a></td>
175     <td>border color</td>
176   </tr>
177
178   <tr>
179     <td><a href="command-line-options.html#caption">-caption <var>string</var></a></td>
180     <td>assign a caption to an image</td>
181   </tr>
182
183   <tr>
184     <td><a href="command-line-options.html#channel">-channel <var>type</var></a></td>
185     <td>apply option to select image channels</td>
186   </tr>
187
188   <tr>
189     <td><a href="command-line-options.html#clone">-clone <var>index</var></a></td>
190     <td>clone an image</td>
191   </tr>
192
193   <tr>
194     <td><a href="command-line-options.html#coalesce">-coalesce</a></td>
195     <td>merge a sequence of images</td>
196   </tr>
197
198   <tr>
199     <td><a href="command-line-options.html#colors">-colors <var>value</var></a></td>
200     <td>preferred number of colors in the image</td>
201   </tr>
202
203   <tr>
204     <td><a href="command-line-options.html#colorspace">-colorspace <var>type</var></a></td>
205     <td>set image colorspace</td>
206   </tr>
207
208   <tr>
209     <td><a href="command-line-options.html#comment">-comment <var>string</var></a></td>
210     <td>annotate image with comment</td>
211   </tr>
212
213   <tr>
214     <td><a href="command-line-options.html#compose">-compose <var>operator</var></a></td>
215     <td>set image composite operator</td>
216   </tr>
217
218   <tr>
219     <td><a href="command-line-options.html#composite">-composite</a></td>
220     <td>composite image</td>
221   </tr>
222
223   <tr>
224     <td><a href="command-line-options.html#compress">-compress <var>type</var></a></td>
225     <td>image compression type</td>
226   </tr>
227
228   <tr>
229     <td><a href="command-line-options.html#crop">-crop <var>geometry</var></a></td>
230     <td>preferred size and location of the cropped image</td>
231   </tr>
232
233   <tr>
234     <td><a href="command-line-options.html#debug">-debug <var>events</var></a></td>
235     <td>display copious debugging information</td>
236   </tr>
237
238   <tr>
239     <td><a href="command-line-options.html#define">-define <var>format:option</var></a></td>
240     <td>define one or more image format options</td>
241   </tr>
242
243   <tr>
244     <td><a href="command-line-options.html#density">-density <var>geometry</var></a></td>
245     <td>horizontal and vertical density of the image</td>
246   </tr>
247
248   <tr>
249     <td><a href="command-line-options.html#depth">-depth <var>value</var></a></td>
250     <td>image depth</td>
251   </tr>
252
253   <tr>
254     <td><a href="command-line-options.html#display">-display <var>server</var></a></td>
255     <td>get image or font from this X server</td>
256   </tr>
257
258   <tr>
259     <td><a href="command-line-options.html#dispose">-dispose <var>method</var></a></td>
260     <td>layer disposal method</td>
261   </tr>
262
263   <tr>
264     <td><a href="command-line-options.html#dither">-dither  <var>method</var></a></td>
265     <td>apply error diffusion to image</td>
266   </tr>
267
268   <tr>
269     <td><a href="command-line-options.html#draw">-draw <var>string</var></a></td>
270     <td>annotate the image with a graphic primitive</td>
271   </tr>
272
273   <tr>
274     <td><a href="command-line-options.html#duplicate">-duplicate <var>count,indexes</var></a></td>
275     <td>duplicate an image one or more times</td>
276   </tr>
277
278   <tr>
279     <td><a href="command-line-options.html#endian">-endian <var>type</var></a></td>
280     <td>endianness (MSB or LSB) of the image</td>
281   </tr>
282
283   <tr>
284     <td><a href="command-line-options.html#extent">-extent <var>geometry</var></a></td>
285     <td>set the image size</td>
286   </tr>
287
288   <tr>
289     <td><a href="command-line-options.html#extract">-extract <var>geometry</var></a></td>
290     <td>extract area from image</td>
291   </tr>
292
293   <tr>
294     <td><a href="command-line-options.html#fill">-fill <var>color</var></a></td>
295     <td>color to use when filling a graphic primitive</td>
296   </tr>
297
298   <tr>
299     <td><a href="command-line-options.html#filter">-filter <var>type</var></a></td>
300     <td>use this filter when resizing an image</td>
301   </tr>
302
303   <tr>
304     <td><a href="command-line-options.html#flatten">-flatten</a></td>
305     <td>flatten a sequence of images</td>
306   </tr>
307
308   <tr>
309     <td><a href="command-line-options.html#flip">-flip</a></td>
310     <td>flip image in the vertical direction</td>
311   </tr>
312
313   <tr>
314     <td><a href="command-line-options.html#flop">-flop</a></td>
315     <td>flop image in the horizontal direction</td>
316   </tr>
317
318   <tr>
319     <td><a href="command-line-options.html#font">-font <var>name</var></a></td>
320     <td>render text with this font</td>
321   </tr>
322
323   <tr>
324     <td><a href="command-line-options.html#frame">-frame <var>geometry</var></a></td>
325     <td>surround image with an ornamental border</td>
326   </tr>
327
328   <tr>
329     <td><a href="command-line-options.html#gamma">-gamma <var>value</var></a></td>
330     <td>level of gamma correction</td>
331   </tr>
332
333   <tr>
334     <td><a href="command-line-options.html#geometry">-geometry <var>geometry</var></a></td>
335     <td>preferred size or location of the image</td>
336   </tr>
337
338   <tr>
339     <td><a href="command-line-options.html#gravity">-gravity <var>type</var></a></td>
340     <td>horizontal and vertical text placement</td>
341   </tr>
342
343   <tr>
344     <td><a href="command-line-options.html#green-primary">-green-primary <var>point</var></a></td>
345     <td>chromaticity green primary point</td>
346   </tr>
347
348   <tr>
349     <td><a href="command-line-options.html#help">-help</a></td>
350     <td>print program options</td>
351   </tr>
352
353   <tr>
354     <td><a href="command-line-options.html#identify">-identify</a></td>
355     <td>identify the format and characteristics of the image</td>
356   </tr>
357
358   <tr>
359     <td><a href="command-line-options.html#interlace">-interlace <var>type</var></a></td>
360     <td>type of image interlacing scheme</td>
361   </tr>
362
363   <tr>
364     <td><a href="command-line-options.html#interpolate">-interpolate <var>method</var></a></td>
365     <td>pixel color interpolation method</td>
366   </tr>
367
368   <tr>
369     <td><a href="command-line-options.html#kerning">-kerning <var>value</var></a></td>
370     <td>the space between two characters</td>
371   </tr>
372
373   <tr>
374     <td><a href="command-line-options.html#label">-label <var>string</var></a></td>
375     <td>assign a label to an image</td>
376   </tr>
377
378   <tr>
379     <td><a href="command-line-options.html#limit">-limit <var>type value</var></a></td>
380     <td>pixel cache resource limit</td>
381   </tr>
382
383   <tr>
384     <td><a href="command-line-options.html#log">-log <var>format</var></a></td>
385     <td>format of debugging information</td>
386   </tr>
387
388   <tr>
389     <td><a href="command-line-options.html#mattecolor">-mattecolor <var>color</var></a></td>
390     <td>frame color</td>
391   </tr>
392
393   <tr>
394     <td><a href="command-line-options.html#mode">-mode <var>type</var></a></td>
395     <td>framing style</td>
396   </tr>
397
398   <tr>
399     <td><a href="command-line-options.html#monitor">-monitor</a></td>
400     <td>monitor progress</td>
401   </tr>
402
403   <tr>
404     <td><a href="command-line-options.html#monochrome">-monochrome</a></td>
405     <td>transform image to black and white</td>
406   </tr>
407
408   <tr>
409     <td><a href="command-line-options.html#origin">-origin <var>geometry</var></a></td>
410     <td>image origin</td>
411   </tr>
412
413   <tr>
414     <td><a href="command-line-options.html#page">-page <var>geometry</var></a></td>
415     <td>size and location of an image canvas (setting)</td>
416   </tr>
417
418   <tr>
419     <td><a href="command-line-options.html#pointsize">-pointsize <var>value</var></a></td>
420     <td>font point size</td>
421   </tr>
422
423   <tr>
424     <td><a href="command-line-options.html#polaroid">-polaroid <var>angle</var></a></td>
425     <td>simulate a Polaroid picture</td>
426   </tr>
427
428   <tr>
429     <td><a href="command-line-options.html#profile">-profile <var>filename</var></a></td>
430     <td>add, delete, or apply an image profile</td>
431   </tr>
432
433   <tr>
434     <td><a href="command-line-options.html#quality">-quality <var>value</var></a></td>
435     <td>JPEG/MIFF/PNG compression level</td>
436   </tr>
437
438   <tr>
439     <td><a href="command-line-options.html#quantize">-quantize <var>colorspace</var></a></td>
440     <td>reduce image colors in this colorspace</td>
441   </tr>
442
443   <tr>
444     <td><a href="command-line-options.html#quiet">-quiet</a></td>
445     <td>suppress all warning messages</td>
446   </tr>
447
448   <tr>
449     <td><a href="command-line-options.html#red-primary">-red-primary <var>point</var></a></td>
450     <td>chromaticity red primary point</td>
451   </tr>
452
453   <tr>
454     <td><a href="command-line-options.html#regard-warnings">-regard-warnings</a></td>
455     <td>pay attention to warning messages.</td>
456   </tr>
457
458   <tr>
459     <td><a href="command-line-options.html#repage">-repage <var>geometry</var></a></td>
460     <td>size and location of an image canvas</td>
461   </tr>
462
463   <tr>
464     <td><a href="command-line-options.html#resize">-resize <var>geometry</var></a></td>
465     <td>resize the image</td>
466   </tr>
467
468   <tr>
469     <td><a href="command-line-options.html#respect-parentheses">-respect-parentheses</a></td>
470     <td>settings remain in effect until parenthesis boundary.</td>
471   </tr>
472
473   <tr>
474     <td><a href="command-line-options.html#rotate">-rotate <var>degrees</var></a></td>
475     <td>apply Paeth rotation to the image</td>
476   </tr>
477
478   <tr>
479     <td><a href="command-line-options.html#sampling-factor">-sampling-factor <var>geometry</var></a></td>
480     <td>horizontal and vertical sampling factor</td>
481   </tr>
482
483   <tr>
484     <td><a href="command-line-options.html#scale">-scale <var>geometry</var></a></td>
485     <td>scale the image</td>
486   </tr>
487
488   <tr>
489     <td><a href="command-line-options.html#scenes">-scenes<var>range</var></a></td>
490     <td>image scene range</td>
491   </tr>
492
493   <tr>
494     <td><a href="command-line-options.html#seed">-seed <var>value</var></a></td>
495     <td>seed a new sequence of pseudo-random numbers</td>
496   </tr>
497
498   <tr>
499     <td><a href="command-line-options.html#shadow">-shadow <var>geometry</var></a></td>
500     <td>simulate an image shadow</td>
501   </tr>
502
503   <tr>
504     <td><a href="command-line-options.html#size">-size <var>geometry</var></a></td>
505     <td>width and height of image</td>
506   </tr>
507
508   <tr>
509     <td><a href="command-line-options.html#strip">-strip</a></td>
510     <td>strip image of all profiles and comments</td>
511   </tr>
512
513   <tr>
514     <td><a href="command-line-options.html#stroke">-stroke <var>color</var></a></td>
515     <td>graphic primitive stroke color</td>
516   </tr>
517
518   <tr>
519     <td><a href="command-line-options.html#synchronize">-synchronize</a></td>
520     <td>synchronize image to storage device</td>
521   </tr>
522
523   <tr>
524     <td><a href="command-line-options.html#taint">-taint</a></td>
525     <td>mark the image as modified</td>
526   </tr>
527
528   <tr>
529     <td><a href="command-line-options.html#texture">-texture <var>filename</var></a></td>
530     <td>name of texture to tile onto the image background</td>
531   </tr>
532
533   <tr>
534     <td><a href="command-line-options.html#tile">-tile <var>filename</var></a></td>
535     <td>tile image when filling a graphic primitive</td>
536   </tr>
537
538   <tr>
539     <td><a href="command-line-options.html#tile-offset">-tile-offset <var>geometry</var></a></td>
540     <td>set the image tile offset</td>
541   </tr>
542
543   <tr>
544     <td><a href="command-line-options.html#title">-title</a></td>
545     <td>decorate the montage image with a title</td>
546   </tr>
547
548   <tr>
549     <td><a href="command-line-options.html#transform">-transform</a></td>
550     <td>affine transform image</td>
551   </tr>
552
553   <tr>
554     <td><a href="command-line-options.html#transparent">-transparent <var>color</var></a></td>
555     <td>make this color transparent within the image</td>
556   </tr>
557
558   <tr>
559     <td><a href="command-line-options.html#transpose">-transpose</a></td>
560     <td>flip image in the vertical direction and rotate 90 degrees</td>
561   </tr>
562
563   <tr>
564     <td><a href="command-line-options.html#transparent-color">-transparent-color <var>color</var></a></td>
565     <td>transparent color</td>
566   </tr>
567
568   <tr>
569     <td><a href="command-line-options.html#treedepth">-treedepth <var>value</var></a></td>
570     <td>color tree depth</td>
571   </tr>
572
573   <tr>
574     <td><a href="command-line-options.html#trim">-trim</a></td>
575     <td>trim image edges</td>
576   </tr>
577
578   <tr>
579     <td><a href="command-line-options.html#type">-type <var>type</var></a></td>
580     <td>image type</td>
581   </tr>
582
583   <tr>
584     <td><a href="command-line-options.html#units">-units <var>type</var></a></td>
585     <td>the units of image resolution</td>
586   </tr>
587
588   <tr>
589     <td><a href="command-line-options.html#unsharp">-unsharp <var>geometry</var></a></td>
590     <td>sharpen the image</td>
591   </tr>
592
593   <tr>
594     <td><a href="command-line-options.html#verbose">-verbose</a></td>
595     <td>print detailed information about the image</td>
596   </tr>
597
598   <tr>
599     <td><a href="command-line-options.html#version">-version</a></td>
600     <td>print version information</td>
601   </tr>
602
603   <tr>
604     <td><a href="command-line-options.html#view">-view</a></td>
605     <td>FlashPix viewing transforms</td>
606   </tr>
607
608   <tr>
609     <td><a href="command-line-options.html#virtual-pixel">-virtual-pixel <var>method</var></a></td>
610     <td>access method for pixels outside the boundaries of the image</td>
611   </tr>
612
613   <tr>
614     <td><a href="command-line-options.html#white-point">-white-point <var>point</var></a></td>
615     <td>chromaticity white point</td>
616   </tr>
617
618   </tbody>
619 </table>
620
621 </div>
622   <footer class="magick-footer">
623     <p><a href="support.html">Donate</a> •
624      <a href="sitemap.html">Sitemap</a> •
625     <a href="links.html">Related</a> •
626     <a href="security-policy.html">Security</a> •
627     <a href="architecture.html">Architecture</a>
628 </p>
629     <p><a href="montage.html#">Back to top</a> •
630     <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
631     <a href="https://www.imagemagick.org/script/contact.php">Contact Us</a></p>
632         <p><small>© 1999-2017 ImageMagick Studio LLC</small></p>
633   </footer>
634 </div><!-- /.container -->
635
636   <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
637   <script src="../js/magick.html"></script>
638 </div>
639 </body>
640 </html>
641 <!-- Magick Cache 21st January 2017 12:17 -->