Imagemagick command line in PHP

Posted by charly on Stack Overflow See other posts from Stack Overflow or by charly
Published on 2011-01-17T03:11:42Z Indexed on 2011/01/17 3:53 UTC
Read the original article Hit count: 297

Filed under:
|

Hello everyone,

I've got the following two commands for imagemagick in the command line:

convert in.png container-mask.png +matte -compose CopyOpacity -composite  out.png
composite container.png  out.png -compose multiply final.png

Those two commands include 3 files:

  • in.png: the file that should be masked
  • container-mask.png: the back/white mask of the areas of container.png where in.png should be visible
  • container.png image that includes the container for in.png, the one that has been masked in black/white with container-mask.png

Now the question is how to transpose this commands into PHP calls. I've played around quite a bit, but I can't make sense of the API at http://php.net/manual/en/book.imagick.php

Thanks and Bests, Charly

© Stack Overflow or respective owner

Related posts about php

Related posts about imagemagick