We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Help me Phalcon Imagick Watermark

Hi all, I'm trying to use watermark in phalcon imagick. But failed, I have one logo transparent. The result is a black background appear, please help me. This my code

$watermark = new \Phalcon\Image\Adapter\Imagick('/images/1.jpg');
        $watermark->watermark('/logo.png'))->save();

edited Sep '16

public watermark (Phalcon\Image\Adapter $watermark, [mixed $offsetX], [mixed $offsetY], [mixed $opacity])

It seems that you must pass Phalcon\Image\Adapter object instance to this method.



3.4k

I had a similar problem with the method "watermark". Working with GD library I found a solution to work correctly "watermark" method with transparency, for Imagick solution is not found, so used "compositimage" method; more info abaut this method u can read there: https://phpimagick.com/Imagick/compositeImage