Is it possible to merge multiple 'montage' command ?
Posted: 2015-04-19T02:02:18-07:00
Hello everybody
I have a script that takes 4 pictures and duplicate them to have 8 small pictures in one.
Here is what i expect : http://img11.hostingpics.net/pics/831624stack.png
I have a code that works well but it needs to save multiple temporary images. So I was looking if I could merge those command to have only one image saving. That would help to make the script faster.
Is that a good way to do it ?
Thanks everybody !
I have a script that takes 4 pictures and duplicate them to have 8 small pictures in one.
Here is what i expect : http://img11.hostingpics.net/pics/831624stack.png
I have a code that works well but it needs to save multiple temporary images. So I was looking if I could merge those command to have only one image saving. That would help to make the script faster.
Code: Select all
//Make image smaller
convert /home/pi/images/*.png -resize 487x296 -flop -set filename:f "/home/pi/imagesResized/%t%p" '%[filename:f].png
//Make one col off 4 images
montage /home/pi/imagesResized/*.png -tile 1x4 -geometry +0+15 -background none /home/pi/line.png
//Duplicate to two cols
montage /home/pi/line.png /home/pi/line.png -tile 2x1 -geometry +45+0 -background none /home/pi/photos.png
//Add the background
suffix=$(date +%H%M%S)
montage /home/pi/photos.png -geometry +20+247 -texture /home/pi/data/background_photo.png /home/pi/photo_${suffix}.jpg
Is that a good way to do it ?
Thanks everybody !