Page 1 of 1

composite 2 images with gravity offset?

Posted: 2016-03-14T03:02:40-07:00
by coreelements
Hi

I have this code

Code: Select all

/opt/ImageMagick/bin/composite  -dissolve 50 -gravity North 'image_1.png' 'image_2.png' -alpha Set 'output.png'
Wich works fine. It will combine 2 images where image_2 has a alpha of 50% and will be placed center north on top of image_1 and outputted to output.png.

Now I want to "offset" image_2 .. that means .. I still want it gravity north, but let's say offset -10px left or +20px right.

Any idea how to do this?

Greets

Re: composite 2 images with gravity offset?

Posted: 2016-03-14T03:14:53-07:00
by Bonzo
Try:

Code: Select all

/opt/ImageMagick/bin/composite  -dissolve 50 -gravity North -geometry -10+20 'image_1.png' 'image_2.png' -alpha Set 'output.png'