How to use Imagick to merge and mask images?

前端 未结 4 942
半阙折子戏
半阙折子戏 2020-12-02 08:05

I know very little of image processing and even less of the terminology used, so please bear with me.

Basically, I want to merge two images together where one of t

4条回答
  •  有刺的猬
    2020-12-02 08:16

    http://www.imagemagick.org/Usage/compose/#dstin should do the trick, but you need to use images with alpha channels (that shouldn't be a problem).

    Edit: in PHP you have to pass it (imagick::COMPOSITE_DSTIN) as a parameter in compositeimage. Other filters in Composite Operator Constants may also be useful to you.

提交回复
热议问题