Append multiple images on canvas

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
Rye
Posts: 158
Joined: 2013-02-25T10:43:05-07:00
Authentication code: 6789

Append multiple images on canvas

Post by Rye »

So this is some theory here.

I want to lay out some pictures I have (lets say for this example: 10 pictures that are in size of 640x1136) on a canvas.

I want them to be put side by side if I would define the canvas 6400x1136 and for example if I went ahead and used 640x1136 as canvas size it should simply
paste the pictures under each other.

Thanks in advance for suggestions.

(Bonus kudos for whomever can integrade a for (*.filetype) inside the command as this would make the command easier.
Version: ImageMagick-7.0.7-28-Q16-x64-static http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Append multiple images on canvas

Post by snibgo »

"+append" will put images side by side. "-composite" will stack them on top of each other.

See:
http://www.imagemagick.org/script/comma ... php#append
http://www.imagemagick.org/script/comma ... #composite
etc.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Append multiple images on canvas

Post by fmw42 »

convert *.jpg -append result

or

convert *.jpg +append result

Depending upon whether arranged vertically or horizontally

see
http://www.imagemagick.org/Usage/layers/#append
Rye
Posts: 158
Joined: 2013-02-25T10:43:05-07:00
Authentication code: 6789

Re: Append multiple images on canvas

Post by Rye »

is it possible to define a canvas for stacking ?

so it will stop and continue stacking like this:
HHHHHH
HHH
Version: ImageMagick-7.0.7-28-Q16-x64-static http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Append multiple images on canvas

Post by fmw42 »

see montage
http://www.imagemagick.org/Usage/montage/

but you need to tell it how many tiles in a row (or column)

Code: Select all

montage *.jpg -tile 6x -geometry +0+0 result
Post Reply