ThinkingInBits ThinkingInBits - 2 months ago 14
PHP Question

How to create watermark with imagemagick

I'm trying to create a watermark with ImageMagick however, the guides on layering are pretty daunting. Basically I'll have one base image say "base.jgp" and an overlay image say "overlay.jpg". Overlay.jpg would be smaller than base.jpg. Which exec command would I run to place overlay centered on top of base.jpg?


shell_exec("composite -gravity center ./images/watermark_horizontal.png {$this->path} {$this->path}");

Here we go