Place 2 images side by side

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jmads
Posts: 2
Joined: 2019-08-22T13:01:25-07:00
Authentication code: 1152

Place 2 images side by side

Post by jmads »

I need help placing 2 images that are the same size, side by side.

I have several thousand images in one directory. Using the command line, I would like to place the before image next to its corresponding after image. The files are named as follows: before 12345 obj.1 v.1.jpg after 12345 obj.1 v.1.jpg.

I'd like to make the output file name the number followed by_before and after like this: 12345_before and after.jpg.

Thanks!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Place 2 images side by side

Post by snibgo »

What version of IM? On what platform?

The IM command could be something like:

Code: Select all

magick in_before.jpg in_after.jpg +append out.jpg
You will need a shell script to loop through the files and manage the filenames.
snibgo's IM pages: im.snibgo.com
jmads
Posts: 2
Joined: 2019-08-22T13:01:25-07:00
Authentication code: 1152

Re: Place 2 images side by side

Post by jmads »

Sorry, new to the program:
using ImageMagick-7.0.8-61-Q16-x64-dll.exe on windows 10

thanks for the help.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Place 2 images side by side

Post by snibgo »

This is an ImageMagick forum. I have shown you the ImageMagick command. If you also need help writing Windows scripts, I suggest you find a Windows script forum.
snibgo's IM pages: im.snibgo.com
Post Reply