Script type: Bash Script
Via a Bash script i'm reading in coordinates (X:Y) line by line from a txt file (which has several thousand lines), and then using them to position one of five small (30x30) images at those coordinates on a canvas, and then saving this out as one single image.
I've been bashing my head against the documentation and Google and so far I do have it working, but only with one of the small images (rather than all 5) and it takes ages to complete.
This is my current code:
Code: Select all
while IFS=':' read -r x y do convert -size 5000x5000 /var/www/html/magic/images/small_image_one.png -repage +$x+$y miff:-; done </var/www/html/magic/values.txt | convert -size 5000x5000 canvas:none miff:- -layers merge +repage /var/www/html/magic/images/output3.png
I'm wanting to read in the small image filepath from this txt file as well (which i can do no problem) but as it's the same 5 images that get used over and over again Im thinking they can be instantiated once and then reused (as per Point 8 on https://stackoverflow.com/questions/287 ... le_rich_qa)
Can anyone point me in the right direction of a better technique? Thank you for your time.