Example #1
0
 /**
  * (non-PHPdoc)
  * @see \Simplify\Thumb\Plugin::process()
  */
 protected function process(\Simplify\Thumb\Processor $thumb, $overlayImage = null, $dst_x = 0, $dst_y = 0, $src_x = 0, $src_y = 0, $src_w = null, $src_h = null, $pct = 0)
 {
     $overlay = \Simplify\Thumb\Functions::load($overlayImage);
     $src_w = is_null($src_w) ? imagesx($overlay) : $src_w;
     $src_h = is_null($src_h) ? imagesy($overlay) : $src_h;
     imagecopymerge($thumb->image, $overlay, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct);
 }
Example #2
0
 /**
  * (non-PHPdoc)
  * @see \Simplify\Thumb\Plugin::process()
  */
 protected function process(\Simplify\Thumb\Processor $thumb, $overlayImage = null, $dst_x = 0, $dst_y = 0, $src_x = 0, $src_y = 0, $dst_w = null, $dst_h = null, $src_w = null, $src_h = null)
 {
     $overlay = \Simplify\Thumb\Functions::load($overlayImage);
     $dst_w = is_null($dst_w) ? imagesx($overlay) : $dst_w;
     $dst_h = is_null($dst_h) ? imagesy($overlay) : $dst_h;
     $src_w = is_null($src_w) ? imagesx($overlay) : $src_w;
     $src_h = is_null($src_h) ? imagesy($overlay) : $src_h;
     imagealphablending($thumb->image, true);
     imagecopyresampled($thumb->image, $overlay, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
 }