Ejemplo n.º 1
0
 protected function _watermark($filename, $position, $padding = 5)
 {
     extract(parent::_watermark($filename, $position, $padding));
     $wmimage = new Fuel_Imagick();
     $wmimage->readImage($filename);
     $wmimage->evaluateImage(Fuel_Imagick::EVALUATE_MULTIPLY, $this->config['watermark_alpha'] / 100, Fuel_Imagick::CHANNEL_ALPHA);
     $this->imagick->compositeImage($wmimage, Fuel_Imagick::COMPOSITE_DEFAULT, $x, $y);
 }
Ejemplo n.º 2
0
 protected function _watermark($filename, $position, $padding = 5)
 {
     $values = parent::_watermark($filename, $position, $padding);
     if ($values == false) {
         throw new \InvalidArgumentException("Watermark image not found or invalid filetype.");
     }
     extract($values);
     $x >= 0 and $x = '+' . $x;
     $y >= 0 and $y = '+' . $y;
     $this->exec('composite', '-compose atop -geometry ' . $x . $y . ' ' . '-dissolve ' . $this->config['watermark_alpha'] . '% ' . '"' . $filename . '" "' . $this->image_temp . '" ' . $image);
 }