Page 1 of 1

Appending a group of images

Posted: 2020-02-12T06:58:14-07:00
by Looyner
Hi there! I am trying to append a group of images.

In a folder of 100 images, I want to append 5 images per JPG file. So, it would be 20 files of 5 appended images.

This is my current command:

Code: Select all

convert -append  *.jpg new.jpg
All I get now is a JPG file of 100 appended images.

Tried with

Code: Select all

convert -append  *.jpg[1-5] new.jpg
But didn't worked.

Any help?

Thanks!

Re: Appending a group of images

Posted: 2020-02-12T08:07:40-07:00
by snibgo

Code: Select all

magick montage *.jpg -geometry +0+0 -tile 1x5 outdir/out.jpg

Re: Appending a group of images

Posted: 2020-02-12T09:33:37-07:00
by GeeMack
Looyner wrote:
2020-02-12T06:58:14-07:00
In a folder of 100 images, I want to append 5 images per JPG file. So, it would be 20 files of 5 appended images.
If your available memory can handle reading in all the images in one command, and if all the images are the same height, something like this should do what you describe...

Code: Select all

convert *.jpg -append -crop 1x5@ new%02d.jpg
That reads in all the images, appends them vertically, then crops that result into 5 equal pieces of 20 appended images each. The output files will be named "new00.jpg", "new01.jpg", "new02.jpg", ... etc. Use "-scene 1" right before the output in the command to start the numbering at 01.

Re: Appending a group of images

Posted: 2020-02-13T02:06:34-07:00
by Looyner
snibgo wrote:
2020-02-12T08:07:40-07:00

Code: Select all

magick montage *.jpg -geometry +0+0 -tile 1x5 outdir/out.jpg
worked thank you for helping :)

Re: Appending a group of images

Posted: 2020-02-13T02:07:18-07:00
by Looyner
GeeMack wrote:
2020-02-12T09:33:37-07:00
Looyner wrote:
2020-02-12T06:58:14-07:00
In a folder of 100 images, I want to append 5 images per JPG file. So, it would be 20 files of 5 appended images.
If your available memory can handle reading in all the images in one command, and if all the images are the same height, something like this should do what you describe...

Code: Select all

convert *.jpg -append -crop 1x5@ new%02d.jpg
That reads in all the images, appends them vertically, then crops that result into 5 equal pieces of 20 appended images each. The output files will be named "new00.jpg", "new01.jpg", "new02.jpg", ... etc. Use "-scene 1" right before the output in the command to start the numbering at 01.
Thank you for the solution. have a great day