Ejemplo n.º 1
0
 /**
  * Returns the entered image with a watermark printed.
  * Similar to the the media firewall function.
  *
  * @param resource $im Certificate image to watermark
  * @return resource Watermarked image
  */
 protected function applyWatermark($im)
 {
     // text to watermark with
     if (method_exists($this->media, 'getWatermarkText')) {
         $word1_text = $this->media->getWatermarkText();
     } else {
         $word1_text = $this->media->getTitle();
     }
     $this->embedText($im, $word1_text, $this->font_max_size, $this->font_color, WT_ROOT . Config::FONT_DEJAVU_SANS_TTF, 'top', 'left');
     return $im;
 }