Page 1 of 1

Merge images side by side from two folders with the same name

Posted: 2018-03-28T03:04:48-07:00
by jarrao
Sorry for noob question but im just starting with imagemagick.
I have two folders with ".jpg" files , "folder1" and "folder2"
I want imagemagick to merge all the files with the same name and create a new ".jpg" on "folder3" or wathever.

Folder1

Image

Folder2

Image

Folder3

Image

Re: Merge images side by side from two folders with the same name

Posted: 2018-03-28T03:20:07-07:00
by snibgo
What version of IM? What script language (eg bash, or Windows BAT)?

How many images, at what size? Are corresponding images the same size?

Re: Merge images side by side from two folders with the same name

Posted: 2018-03-28T06:31:36-07:00
by jarrao
Hi , thanks for the quick replay:

I have installed "ImageMagick-6.9.2-Q16" on "Windows 8.1 x64"

Maybe I have between 200 or 300 images on each folder.
The size on each folder is exactly the same , I mean "400x300px" on "folder1" for all the jpgs, "200x300px" on "folder2" for all the jpgs and then should be "600x300" on "folder3"

Re: Merge images side by side from two folders with the same name

Posted: 2018-03-28T07:08:14-07:00
by snibgo
Then it's the same answer as I gave in a recent thread (but I can't find). Windows BAT script:

Code: Select all

for %%F in (folder1\*.jpg) do convert folder1\%%~nF.jpg folder2\%%~nF.jpg +append folder3\%%~nF.jpg
There are other methods that read all the inputs in a single command, so may be faster, but they are more complex.

Re: Merge images side by side from two folders with the same name

Posted: 2018-03-28T08:23:53-07:00
by jarrao
Thanks again , so... as I want to learn how imagemagick works , what about if I want to create a composition setting a png on the right , named like the other two jpgs?
I mean "folder1" , "folder2" and a new "folder3" with "pngs" maybe with "150x50px" (the name of the pngs is the same of the folder 1 , and folder 2).
And create something like this on a "folder4"

Image

Re: Merge images side by side from two folders with the same name

Posted: 2018-03-28T11:48:08-07:00
by snibgo