Back to Imagemagick

ImageMagick

www/montage.html

7.1.2-2111.5 KB
Original Source

Example UsageOption Summary

Use the montage 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 Command Line Processing for advice on how to structure your montage command or see below for example usages of the command.

Example Usage

We list a few examples of the montage command here to illustrate its usefulness and ease of use. To get started, let's montage two images into a single composite:

magick montage -background '#336699' -geometry 70x70+4+4 rose.jpg red-ball.png montage.jpg

Ok, let's add some decorations:

magick montage -label %f -frame 5 -background '#336699' -geometry 70x70+4+4 rose.jpg red-ball.png frame.jpg

You can find additional examples of using montage at Examples of ImageMagick Usage and Examples of ImageMagick Usage.

Ashlar Pseudo-image Format

Use the Ashlar pseudo-image format to lay out an image sequence in continuous irregular courses. By default, a reasonable canvas size and border width is determined relative to the image collection you provide. You can explicitly set the canvas size and border width by appending to the filename, e.g. ashlar:canvas.png[1024x768+4+4]. By default, alignment is along the left edge. Use -define ashlar:best-fit=true to align on both the left and right edges. You can label the image tiles with, for example, -label %f. Here is an example command:

magick '\*.png' -resize 320x320 -label %f ashlar:ashlar.png

This is designed to quickly view a collection of images. To have more control over the layout of your image tiles, use the montage command instead.

Option Summary

The montage command recognizes these options. Click on an option to get more details about how that option works.

OptionDescription
-adaptive-sharpen geometryadaptively sharpen pixels; increase effect near edges
-adjoinjoin images into a single multi-image file
-affine matrixaffine transform matrix
-alphaon, activate, off, deactivate, set, opaque, copy", transparent, extract, background, or shape the alpha channel
-annotate geometry textannotate the image with text
-authenticate valuedecrypt image with this password
-auto-orientautomagically orient image
-background colorbackground color
-blue-primary pointchromaticity blue primary point
-blur geometryreduce image noise and reduce detail levels
-border geometrysurround image with a border of color
-bordercolor colorborder color
-caption stringassign a caption to an image
-channel typeapply option to select image channels
-clone indexclone an image
-coalescemerge a sequence of images
-colors valuepreferred number of colors in the image
-colorspace typeset image colorspace
-comment stringannotate image with comment
-compose operatorset image composite operator
-compositecomposite image
-compress typeimage compression type
-crop geometrypreferred size and location of the cropped image
-debug eventsdisplay copious debugging information
-define format:optiondefine one or more image format options
-delay centisecondsdisplay the next image after pausing
-density geometryhorizontal and vertical density of the image
-depth valueimage depth
-display serverget image or font from this X server
-dispose methodlayer disposal method
-distort type coefficientsdistort image
-dither methodapply error diffusion to image
-draw stringannotate the image with a graphic primitive
-duplicate count,indexesduplicate an image one or more times
-endian typeendianness (MSB or LSB) of the image
-extent geometryset the image size
-extract geometryextract area from image
-family namerender text with this font family
-fill colorcolor to use when filling a graphic primitive
-filter typeuse this filter when resizing an image
-flattenflatten a sequence of images
-flipflip image in the vertical direction
-flopflop image in the horizontal direction
-font namerender text with this font
-frame geometrysurround image with an ornamental border
-gamma valuelevel of gamma correction
-geometry geometrypreferred size or location of the image
-gravity typehorizontal and vertical text placement
-green-primary pointchromaticity green primary point
-helpprint program options
-identifyidentify the format and characteristics of the image
-interlace typetype of image interlacing scheme
-interpolate methodpixel color interpolation method
-kerning valuethe space between two characters
-label stringassign a label to an image
-limit type valuepixel cache resource limit
-log formatformat of debugging information
-mattecolor colorframe color
-mode typeframing style
-monitormonitor progress
-monochrometransform image to black and white
-origin geometryimage origin
-page geometrysize and location of an image canvas (setting)
-pointsize valuefont point size
-polaroid anglesimulate a Polaroid picture
-profile filenameadd, delete, or apply an image profile
-quality valueJPEG/MIFF/PNG compression level
-quantize colorspacereduce image colors in this colorspace
-quietsuppress all warning messages
-red-primary pointchromaticity red primary point
-regard-warningspay attention to warning messages.
-repage geometrysize and location of an image canvas
-resize geometryresize the image
-respect-parenthesessettings remain in effect until parenthesis boundary.
-rotate degreesapply Paeth rotation to the image
-sampling-factor geometryhorizontal and vertical sampling factor
-scale geometryscale the image
-scenes rangeimage scene range
-seed valueseed a new sequence of pseudo-random numbers
-shadow geometrysimulate an image shadow
-size geometrywidth and height of image
-stripstrip image of all profiles and comments
-stroke colorgraphic primitive stroke color
-synchronizesynchronize image to storage device
-taintmark the image as modified
-texture filenamename of texture to tile onto the image background
-tile geometrynumber of tiles per row and column (e.g. -tile 8x)
-tile-offset geometryset the image tile offset
-titledecorate the montage image with a title
-transformaffine transform image
-transparent colormake this color transparent within the image
-transposeflip image in the vertical direction and rotate 90 degrees
-transparent-color colortransparent color
-treedepth valuecolor tree depth
-trimtrim image edges
-type typeimage type
-units typethe units of image resolution
-unsharp geometrysharpen the image
-verboseprint detailed information about the image
-versionprint version information
-viewFlashPix viewing transforms
-virtual-pixel methodaccess method for pixels outside the boundaries of the image
-white-point pointchromaticity white point