→ Blog → Post
(TIP)
Pasting Images Together
Stitching images together with ImageMagick's convert.
by @admin, june 24, 2020, 12:09am utc
The command-line convert command, which is part of the very powerful ImageMagick image manipulation package, provides a very simple way to stitch together images. This can be done either vertically, using the -append parameter, or horizontally, using the +append parameter.
This can even provide a way to stitch together landscape photographs, to make one panoramic shot.
convert also works on more than two images.
The examples below show 3 images pasted together to create the result-sprite png file.
# Vertically
# Example (vertical sprite):
$ convert image1.png image2.png image3.png -append result/result-sprite.png
# Horizontally
# Example (horizontal sprite):
$ convert image1.png image2.png image3.png +append result/result-sprite.png
So for example, these two images ...

... can be pasted together into the below one using:
$ convert blog-pieces1.png blog-pieces2.png +append blog-pieces.png

tags: All users, Tips