composite multiple 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
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

composite multiple images

Post by agriz »

I want to composite few images on one source images.
Before attaching those images, i need to resize them.

Can i do those in single convert? Please give me example code

Re-sizing images one by one by using multiple convert.
Composite images one by one in source image using multiple convert

And

Doing all these in one convert. Which is best in performance? ( considering server's resource usage too )
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: composite multiple images

Post by Bonzo »

You do not say how you are using the code but you should be able to modify this to your needs:

Code: Select all

convert image_1.jpg ( image_2.jpg -resize 100x100 ) -geometry +100+100 -composite  ( image_3.jpg -resize 200x200 ) -geometry +500+500 -composite output.jpg
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: composite multiple images

Post by anthony »

There are about 3 ways of doing multi-image composition with re-sizing.
These are the main topic of ...

IM Examples, Multi-Image Layers
http://www.imagemagick.org/Usage/layers/#composite
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply