Reputation: 694
I have different images in different .png files like the following:
I'd like to find a command line tool that allows me to mix all those images into a single one while generating a new .png file:
I know that using ImageMagick
we can manipulate images from the command line in many useful ways. I've looked for questions under the imagemagick tag here on stackoverflow but I didn't find anything similar to what I need and the man pages of the ImageMagick tools like convert
and compare
are extremely extensive. Is it even possible to solve using ImageMagick? If so, how can I do it?
Edit:
Individual images files:
Upvotes: 1
Views: 280
Reputation: 53081
In ImageMagick 6, you can do the following to composite each image onto the circle.
Unix Syntax:
convert circle.png \
cloud.png -geometry +60+10 -compose over -composite \
phone.png -geometry +40+100 -compose over -composite \
arrow.png -geometry +120+100 -compose over -composite \
result.png
Windows Syntax:
convert.exe circle.png \
cloud.png -geometry +60+10 -compose over -composite ^
phone.png -geometry +40+100 -compose over -composite ^
arrow.png -geometry +120+100 -compose over -composite ^
result.png
If using ImageMagick 7, change convert to magick. On Windows be careful as there is a Windows convert.exe. You may want to rename the ImageMagick convert.exe to something else and use that above.
The \ and ^ are line feed characters so that the command can be written on multiple lines. If you make this all one line, then remove those characters.
Upvotes: 1