Concatenating images in ImageMagick

Software

UPDATE: I’ve since been told an even better way.

I script as much as possible for Rubenerd, including image processing. This is how I’ve been concatenating images side by side for the longest time:

$ montage -border 0             \
	-geometry x$_ORIGINALHEIGHT \
	-tile 2x                    \
	$_IMAGE1 $_IMAGE2           \
	out.ext

But there’s an easier way!

$ montage -mode concatenate $_IMAGE1 $_IMG2 $_OUT

I don’t have an install to try in GraphicsMagick, but my hunch is its ImageMagick-specific.

More code or lines in your scripts are rewarding, but not half as much as being able to take lines out.

Author bio and support

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

You can leave me a comment by contacting me, and I might publish your thoughts. Please read the FAQs first though.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!