How to do composite and Inverse transparency in php?

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
kocoten1992
Posts: 3
Joined: 2015-05-27T14:28:09-07:00
Authentication code: 6789

How to do composite and Inverse transparency in php?

Post by kocoten1992 » 2015-05-28T02:28:57-07:00

Hi everyone,

This question already been answer but I wanna take this a little further. viewtopic.php?f=1&t=27712

I want to do these thing in PHP Imagemagick but have no idea.

Got 3 image below, layer1.png, layer2.png and result.png repsectively.

How could I produce the result (it is layer2 over layer1, but I got stuck at the end, when cutting the transparency).

Important note: the layer 1 could be white as well, the grey is transparency.

Image

Image

Image


Thank in advance, any advise will be appreciate

User avatar
fmw42
Posts: 24757
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to do composite and Inverse transparency in php?

Post by fmw42 » 2015-05-28T09:35:18-07:00

see my command line or PHP exec() reply/solution at viewtopic.php?f=1&t=27712

Some one who knows Imagick may want to convert that into Imagick code

Post Reply