I'm trying to use the montage command to create a 1x7 array of images, with a background color and vertical spacing between the images.
And I'm hilariously confused, especially by the -border argument.
I'd like to get a my the transparent area of my source images filed with a background color, and then have a full-width by (e.g,) 4 pixel space in another color between each image (and after the last)
image
space
image
space
I'd also like no spacing on the left and right of the images. (I'd call this the "border", but apparently border means something different to montage).
The closest I can get is:
montage -geometry '108x108+0+4' -tile 1x -border 1 -bordercolor '#F9AD88' -background 'red' *.png output.png
but it appears that the border value must be at least 1, and that the border "steals" space from the image.
Short of montaging each image with a spacer, is there a way I can achive this?
Thanks.
I'm runing Version: ImageMagick 6.7.6-6 2012-04-16 Q16 on MS-Windows, using the command line.
Montage, borders and spacing help?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Montage, borders and spacing help?
-border creates a frame around each image.
just create the montage with -geometry to set the spacing and use -background to set the color between image. Then use -trim afterward to get rid of the outside color.
try this as an example:
montage -background red -tile 1x -geometry +0+2 rose: rose: rose: rose: miff:- | convert - -trim rose_montage.png
Note the geometry is +2 in the vertical direction because each image will have border around it of 2. So the total space between successive images will be 4.
just create the montage with -geometry to set the spacing and use -background to set the color between image. Then use -trim afterward to get rid of the outside color.
try this as an example:
montage -background red -tile 1x -geometry +0+2 rose: rose: rose: rose: miff:- | convert - -trim rose_montage.png
Note the geometry is +2 in the vertical direction because each image will have border around it of 2. So the total space between successive images will be 4.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Montage, borders and spacing help?
This is also detailed in spliting up arrays of images
See Cutting and Bordering, Separating Spaced-out Tiling Images
http://www.imagemagick.org/Usage/crop/#crop_spaced
There is a plans for various layout operator and methods, including appends with various 'spacing' modes.
However until IMv7 development reaches beta testing, this is not likely to be added.
See Cutting and Bordering, Separating Spaced-out Tiling Images
http://www.imagemagick.org/Usage/crop/#crop_spaced
There is a plans for various layout operator and methods, including appends with various 'spacing' modes.
However until IMv7 development reaches beta testing, this is not likely to be added.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/