Appending a group of images

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
Looyner
Posts: 3
Joined: 2020-02-12T06:39:48-07:00
Authentication code: 1152

Appending a group of images

Post 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!

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

Re: Appending a group of images

Post by snibgo »

Code: Select all

magick montage *.jpg -geometry +0+0 -tile 1x5 outdir/out.jpg
snibgo's IM pages: im.snibgo.com

User avatar
GeeMack
Posts: 753
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Appending a group of images

Post 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.

Looyner
Posts: 3
Joined: 2020-02-12T06:39:48-07:00
Authentication code: 1152

Re: Appending a group of images

Post 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 :)

Looyner
Posts: 3
Joined: 2020-02-12T06:39:48-07:00
Authentication code: 1152

Re: Appending a group of images

Post 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

Post Reply