Some questions regarding montage

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
rinox
Posts: 2
Joined: 2011-03-03T08:24:29-07:00
Authentication code: 8675308

Some questions regarding montage

Post by rinox »

I'm trying to put a chopped image together, like a puzzle.

let's say the image is chopped like this
1 2
3 4
then:

montage [1-4].png -tile 2x2 -geometry +0+0 end.png

will put them together like i want it to be.
how can i put them together if they're split like this

1
2 3
4
5 6

for example, or:

1 2
3
4

etc.

i tried using for the first example -tile 1x2x1x2 but that obviously didn't work.
help please.

The second question would be:
I have 5 folders and in every folder are a random number of image files.
i want montage to put all files in one folder into one image and name that image like this "folder%d_.png"

i'm looking for a command line that will do all 5 folders and create 5 images.
thanks in advance.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Some questions regarding montage

Post by fmw42 »

If they are different sizes then you will need to append them one row at a time and then append the rows together. See -+append at http://www.imagemagick.org/Usage/layers/#append

Or flatten or mosaic all the images with specified offsets. see http://www.imagemagick.org/Usage/layers/#flatten and http://www.imagemagick.org/Usage/layers/#mosaic

If all the pieces are the same size, you can put in your montage null: to create spacers, I believe.

see montage at http://www.imagemagick.org/Usage/montage/
rinox
Posts: 2
Joined: 2011-03-03T08:24:29-07:00
Authentication code: 8675308

Re: Some questions regarding montage

Post by rinox »

convert and composite did the trick
it was in your first link
thanks a lot
Post Reply