Page 1 of 1

Composition of two images, one with transparent background

Posted: 2016-01-24T04:59:31-07:00
by ikoop
Hey guys!

I've been struggling for a while with the following command:

I am trying to resize pictureA for the 60x40 format. Then, I want to place it on top of picutreB, keeping in mind that picutre B has a transparent background. So far I've tried the following:

composite -gravity center pictureA.jpg -resize 60x40^> picture2.png -background none test2.png

But this leaves the background of the test2.png Black...


Any ideas?


UPDATE:

I managed to got this working by:

composite -gravity center pictureA.png pictureB.png -background non test.png

where pictureA.png is pictureA.jpg converted. Can I include convert function within my composite?

Re: Composition of two images, one with transparent background

Posted: 2016-01-24T10:11:52-07:00
by snibgo
Please tell us the version of IM you are using, and the platform (Windows, unix, whatever). Diagnosis is also easier if you provide the images you are processing.

The problem might be cured with "-alpha set".

I would always use "convert" for this, not "composite".