Page 1 of 1

Re: Montage problems

Posted: 2009-03-16T15:12:39-07:00
by fmw42
MatStyle wrote:Hi,

I try to make an image montage with IM. So I want to set 4 pictures (PNG) in one picture:

pic1.png pic2.png pic3.png pic4.png -mode Concatenate -tile x1 montage.png

There are two issues:

- I want to have overlapped images (left part of the next picture on the right part of the last picture). So I use "-geometry -100+0". The first usage (pic 2 on pic 1) is fine. But the next overlappings (pic 3 on pic 2 and pic 4 on pic 3) have much more distance!?
- The source PNG files have transparency. But with the montage action the transparency in the montage picture get's lost and it has white background.

Thank you very much for any ideas.

Best regards

Mat Weber
see montage command http://www.imagemagick.org/Usage/montage/
or convert or composite commands http://www.imagemagick.org/Usage/layers/

to get transparency add -channel rgba -alpha on
see http://www.imagemagick.org/Usage/channels/ and http://www.imagemagick.org/Usage/basics/#alpha

Re: Montage problems

Posted: 2009-03-17T20:32:00-07:00
by anthony
The use of negative geometry to overlay images was not designed into montage, it was just an accident that to was found to be useful.

However when you use negatives the canvas size montage generated is too small.
To correct this ad a 'null:' image to the start and end of the montage image sequence. You can trim the resulting image later.


A better way to do this may be to DIY the image placement yourself. See
http://www.imagemagick.org/Usage/layers/#example
for a couple of techniques to do this, including a programing placement technique.