Cauptain wrote: ↑2018-04-24T02:10:50-07:00
I can install Unix on Windows 10 and try your script. No problem for me.
Claudio
You say:
I have 3 pictures: a.jpg - b.jpg e c.jpg
I want to join all in one photo, like d.jpg = abc.jpg
But I am not sure how you want to combine them. Also what is e?
If I assume you just want to append them side-by-side, then you can do it like this.
Image File:
http://www.fmwconcepts.com/misc_tests/c ... gefile.txt
Contents:
lena.jpg spacer.jpg mandril3.jpg
mandril3.jpg spacer.jpg zelda1.jpg
zelda1.jpg spacer.jpg lena.jpg
Input:
Code: Select all
i=0
while read img1 img2 img3; do
convert $img1 $img2 $img3 +append result$i.jpg
i=$((i+1))
done < imagefile.txt
Results:
Note: your file names have spaces in them. So you must enclose them in double quotes in your text file; otherwise, it will try to read each part of the name as a separate file, since the space is the delimiter for the read command. There are ways to get around that by setting the Internal Field Separator to something else, such as a comma or tab. But I won't go into detail unless you say the quoting won't work for you.