freecrop() public method

Crops image according to the given width, height, x and y
public freecrop ( integer $width, integer $height, integer $x = false, integer $y = false ) : static
$width integer
$height integer
$x integer
$y integer
return static
Ejemplo n.º 1
0
 public function testFreeCrop()
 {
     $image = $this->createImage(200, 100, 'png');
     $resize = new ImageResize($image);
     $resize->freecrop(50, 50, $x = 20, $y = 20);
     $this->assertEquals(50, $resize->getDestWidth());
     $this->assertEquals(50, $resize->getDestHeight());
 }