Page 1 of 1

Merge multiple images

Posted: 2012-10-04T13:32:52-07:00
by mikolaskova
Hello,

what is the best way to merge multiple images in to one- i want to have the same effekt like putting them in different layers in gimp and merge them.
the images (png) have transparent areas.

I tried composite with different options but either not all where merged or the images just gets black.

( composite *.png out.png)

Best Regards

Adriana

Re: Merge multiple images

Posted: 2012-10-04T14:15:36-07:00
by fmw42
try (assuming they are all the same size)

convert *.png -background none -flatten out.png

see
http://www.imagemagick.org/Usage/layers/#flatten

Re: Merge multiple images

Posted: 2012-10-04T16:21:38-07:00
by anthony
Or if with offsets, use -layers merge which will expand the canvas in all directions preserving the offsets.

See Layering Images, whcih deals with this type of thing.
http://www.imagemagick.org/Usage/layers/

Can you be a little clearer in exactly how the images are being 'merged'.
Real images? Distortions? Offsets (known or unknown)? Overlaps?
How extensive is the transparent areas?

Re: Merge multiple images

Posted: 2012-10-05T05:54:28-07:00
by mikolaskova
Thank you very much. It worked and I will read about the layers!
Best regards
Adriana
(I'm trying out different methods. Ihave hundreds of images with written text and I want to experiment with them- the aim is to create an animation. The single frames will be different combination of layered text-pages. So I have to figure out how to filter out the non-text-areas, how I can addapt the text-color to a similar value etc.)

Re: Merge multiple images

Posted: 2012-10-22T02:25:02-07:00
by mikolaskova
hello,

how can I change the order of the layers? Do I have to rename the files first? or is there an other way to influence which image comes to upper layer and which to the layers underneath?

Best regards

Adriana

Re: Merge multiple images

Posted: 2012-10-22T09:58:25-07:00
by fmw42
They are normally layered in the order listed in the command line. You can adjust the order using -swap, -insert, -delete etc. see http://www.imagemagick.org/Usage/basics/#list_ops

Re: Merge multiple images

Posted: 2012-10-24T23:02:55-07:00
by mikolaskova
Thank you very much!