Creating Watermarks
Watermarks are easy to create, this code will overlay an image on
top of another
Code:
$phMagick = new \phMagick\Core\Runner();
$action = new \phMagick\Action\Watermark($this->originalFile, $this->newFile);
// transparency of the watermark
$action->setTransparency(70);
// location of the watermark
$action->setGravity('center');
// watermark image (the image to overlay)
$action->setWatermarkImage('data/watermark.png');
$phMagick->run($action);