Monday, April 8, 2013

Make an image montage using ImageMagick

The following makes a 1x10 vertical montage of all .png images in the current folder. Before adding to the montage, images are cropped.

$ montage -geometry +0+0 -tile 1x10  -crop 170x70+115+125 *png montage.jpg

-geometry controls the border arround each sub-image in the montage. +0+0 means no border.

How to decode the crop string "170x70+115+125" :

170x70: new size of the cropped image
+115+125: Pixel (0,0) of the cropped image will be pixel (115,125) of the old one. Pixel (170,70) of the cropped image is pixel (170+115, 70+125) of the old one.

No comments:

Post a Comment