Center Images next to each other
Posted: 2016-11-22T02:36:40-07:00
I have following command:
convert -background none -bordercolor none -gravity west -fill white img1.png label:"1" -border 0x5 +swap -append label:"Kapitel 1" -border 0x5 -append -write miff:- +delete img2.png label:"2" -border 0x5 +swap -append label:"Kapitel 2" -border 0x5 -append -write miff:- +delete img3.png label:"3" -border 0x5 +swap -append label:"Kapitel 3" -border 0x5 -append -write miff:- +delete img4.png label:"4" -border 0x5 +swap -append label:"Kapitel 4" -border 0x5 -append -write miff:- +delete img5.png label:"5" -border 0x5 +swap -append label:"Kapitel 5" -border 0x5 -append miff:- | montage -set label "" miff:- -tile 3x2 -geometry +15-10 -background none result
which creates me an image with 5 image, each image has a text above and under.
The first 3 images above are "centered", but the last 2 images are not centered, how can I center so to say the last 2 image?
If I pick for instance 6 images everything looks fine, but I have to have an option for 1,2,3,4 and 5 images aswell and center them (horizontal and vertical)
How do I achieve this
convert -background none -bordercolor none -gravity west -fill white img1.png label:"1" -border 0x5 +swap -append label:"Kapitel 1" -border 0x5 -append -write miff:- +delete img2.png label:"2" -border 0x5 +swap -append label:"Kapitel 2" -border 0x5 -append -write miff:- +delete img3.png label:"3" -border 0x5 +swap -append label:"Kapitel 3" -border 0x5 -append -write miff:- +delete img4.png label:"4" -border 0x5 +swap -append label:"Kapitel 4" -border 0x5 -append -write miff:- +delete img5.png label:"5" -border 0x5 +swap -append label:"Kapitel 5" -border 0x5 -append miff:- | montage -set label "" miff:- -tile 3x2 -geometry +15-10 -background none result
which creates me an image with 5 image, each image has a text above and under.
The first 3 images above are "centered", but the last 2 images are not centered, how can I center so to say the last 2 image?
If I pick for instance 6 images everything looks fine, but I have to have an option for 1,2,3,4 and 5 images aswell and center them (horizontal and vertical)
How do I achieve this