montage 命令详解

| 选择喜欢的代码风格  

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

montage 命令安装:


-bash: montage: command not found

#Debian
apt-get install graphicsmagick-imagemagick-compat

#Ubuntu
apt-get install graphicsmagick-imagemagick-compat

#Alpine
apk add imagemagick6

#Arch Linux
pacman -S imagemagick6

#Kali Linux
apt-get install graphicsmagick-imagemagick-compat

#Raspbian
apt-get install graphicsmagick-imagemagick-compat

#Docker
docker run cmd.cat/montage montage

montage 命令补充说明:


montage 命令通过组合几个单独的图像来创建合成图像。图像平铺在合成图像上,并带有边框,框架,图像名称等。

该 montage 程序是 ImageMagick 的工具套件。通过组合几个单独的图像,使用它来创建合成图像。这些图像会平铺在合成图像上,并可选地装饰有边框,框架,图像名称等。

montage 命令语法:


montage input-file [options] output-file

montage 命令选项:


Image Settings:
         -adjoin              join images into a single multi-image file
         -affine matrix       affine transform matrix
         -alpha option        on, activate, off, deactivate, set, opaque, copy
                              transparent, extract, background, or shape
         -authenticate value  decrypt image with this password
         -blue-primary point  chromaticity blue primary point
         -bordercolor color   border color
         -caption string      assign a caption to an image
         -channel type        apply option to select image channels
         -colors value        preferred number of colors in the image
         -colorspace type     alternate image colorsapce
         -comment string      annotate image with comment
         -compose operator    composite operator
         -compress type       type of pixel compression when writing the image
         -define format:option
                              define one or more image format options
         -density geometry    horizontal and vertical density of the image
         -depth value         image depth
         -display server      query font from this X server
         -dispose method      layer disposal method
         -dither method       apply error diffusion to image
         -draw string         annotate the image with a graphic primitive
         -encoding type       text encoding type
         -endian type         endianness (MSB or LSB) of the image
         -extract geometry    extract area from image
         -fill color          color to use when filling a graphic primitive
         -filter type         use this filter when resizing an image
         -font name           render text with this font
         -format "string"     output formatted image characteristics
         -gamma value         level of gamma correction
         -geometry geometry   preferred tile and border sizes
         -gravity direction   which direction to gravitate towards
         -green-primary point chromaticity green primary point
         -identify            identify the format and characteristics of the image
         -interlace type      type of image interlacing scheme
         -interpolate method  pixel color interpolation method
         -kerning value       set the space between two letters
         -label string        assign a label to an image
         -limit type value    pixel cache resource limit
         -matte               store matte channel if the image has one
         -mattecolor color    frame color
         -mode type           framing style
         -monitor             monitor progress
         -origin geometry     image origin
         -page geometry       size and location of an image canvas (setting)
         -pointsize value     font point size
         -profile filename    add, delete, or apply an image profile
         -quality value       JPEG/MIFF/PNG compression level
         -quantize colorspace reduce colors in this colorspace
         -quiet               suppress all warning messages
         -red-primary point   chromaticity red primary point
         -regard-warnings     pay attention to warning messages
         -respect-parentheses settings remain in effect until parenthesis boundary
         -sampling-factor geometry
                              horizontal and vertical sampling factor
         -scenes range        image scene range
         -seed value          seed a new sequence of pseudo-random numbers
         -set attribute value set an image attribute
         -shadow              add a shadow beneath a tile to simulate depth
         -size geometry       width and height of image
         -stroke color        color to use when stroking a graphic primitive
         -support factor      resize support: > 1.0 is blurry, < 1.0 is sharp
         -synchronize         synchronize image to storage device
         -taint               declare the image as modified
         -texture filename    name of texture to tile onto the image background
         -thumbnail geometry  create a thumbnail of the image
         -tile geometry       number of tiles per row and column
         -title string        decorate the montage image with a title
         -transparent-color color
                              transparent color
         -treedepth value     color tree depth
         -trim                trim image edges
         -units type          the units of image resolution
         -verbose             print detailed information about the image
         -virtual-pixel method
                              virtual pixel access method
         -white-point point   chromaticity white point

       Image Operators:
         -adaptive-sharpen geometry
                              adaptively sharpen pixels; increase effect near edges
         -annotate geometry text
                              annotate the image with text
         -auto-orient         automagically orient image
         -blur geometry      reduce image noise and reduce detail levels
         -border geometry     surround image with a border of color
         -crop geometry       preferred size and location of the cropped image
         -extent geometry     set the image size
         -flatten             flatten a sequence of images
         -flip                flip image in the vertical direction
         -flop                flop image in the horizontal direction
         -frame geometry      surround image with an ornamental border
         -monochrome          transform image to black and white
         -polaroid angle      simulate a Polaroid picture
         -repage geometry     size and location of an image canvas (operator)
         -resize geometry     resize the image
         -rotate degrees      apply Paeth rotation to the image
         -strip               strip image of all profiles and comments
         -transform           affine transform image
         -transpose           flip image vertically and rotate 90 degrees
         -transparent color   make this color transparent within the image
         -type type           image type
         -unsharp geometry    sharpen the image

       Image Sequence Operators:
         -coalesce            merge a sequence of images
         -composite           composite image

       Image Stack Operators:
         -clone indexes       clone an image
         -delete indexes      delete the image from the image sequence
         -duplicate count,indexes
                               duplicate an image one or more times
         -insert index        insert last image into the image sequence
         -reverse             reverse image sequence
         -swap indexes        swap two images in the image sequence

       Miscellaneous Options:
         -debug events        display copious debugging information
         -help                print program options
         -log format          format of debugging information
         -list type           print a list of supported option arguments
         -version             print version information

       In  addition  to those listed above, you can specify these standard X resources as command
       line options:  -background, -bordercolor, -borderwidth, -font, -mattecolor, or -title.

       By default, the image format of `file' is determined by its magic number.   To  specify  a
       particular  image format, precede the filename with an image format name and a colon (i.e.
       ps:image) or specify the image type as  the  filename  suffix  (i.e.  image.ps).   Specify
       'file' as '-' for standard input or output.

montage 命令参数:


文件:需要处理的图片文件

montage 命令实例:


montage 将图像平铺到网格中,自动调整大于网格单元格大小的图像的大小:

montage image1.png image2.jpg imageN.png montage.jpg

montage 将图像平铺到网格中,然后根据最大图像自动计算网格单元大小:

montage image1.png image2.jpg imageN.png -geometry +0+0 montage.jpg

montage 设置网格单元的大小,并在平铺之前调整图像的大小以适合它:

montage image1.png image2.jpg imageN.png -geometry 640x480+0+0 montage.jpg

montage 限制网格中的行和列数,从而导致输入图像溢出到多个输出蒙太奇中:

montage image1.png image2.jpg imageN.png -geometry +0+0 -tile 2x3 montage_%d.jpg

montage 在平铺之前调整图像大小并裁剪图像以完全填充其网格单元:

montage image1.png image2.jpg imageN.png -geometry +0+0 -resize 640x480^ -gravity center -crop 640x480+0+0 montage.jpg

montage 命令扩展阅读:




montage 命令评论