php namespace Сontrario class GD extends Phalcon Image Adapter GD publ

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<?php
namespace Сontrario;
class GD extends \Phalcon\Image\Adapter\GD
{
public function copyresampled($dst, $dst_x, $dst_y, $src_x, $src_y, $dst_w = false,
$dst_h = false, $src_w = false, $src_h = false)
{
$dst_w = $dst_w ? $dst_w : $dst->getWidth();
$dst_h = $dst_h ? $dst_h : $dst->getHeight();
$src_w = $src_w ? $src_w : $this->getWidth();
$src_h = $src_h ? $src_h : $this->getHeight();
return imagecopyresampled($dst->getImage(), $this->getImage(),
$dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
}
}