GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
Combine Images |
In this example we take two images from the internet, generate an arrow image and then combine all three into one image with an arrow between. Various resizing and border placement is done to improve the aesthetics.
$ wget -O img1.jpg \ https://www.goodfreephotos.com/cache/australia/south-australia/adelaide/\ adelaide-northern-terrace-in-1839-southern-australia.jpg $ wget -O img2.jpg \ https://www.goodfreephotos.com/albums/australia/south-australia/adelaide/\ north-terrace-of-adelaide-in-1841-in-southern-australia.jpg $ arrow_head="l -15,-5 +5,+5 -5,+5 +15,-5 z" $ convert -size 100x30 xc: -draw 'stroke skyblue fill skyblue rectangle 30,14 70,16' \ -draw "stroke skyblue fill skyblue path 'M 70,15 $arrow_head' " \ -resize 400% arrow.png $ convert img1.jpg arrow.png img2.jpg -gravity Center +append \ -resize 30% -bordercolor White -border 10x10 result.png $ display result.png |
|
The images used here come from https://www.goodfreephotos.comand is under the CC0 / Public Domain license.