For example,
~~~
$obj->crop('path\to\image.jpg', 200, 200, [5, 5]);
$point = new \Imagine\Image\Point(5, 5);
$obj->crop('path\to\image.jpg', 200, 200, $point);
~~~
public static crop ( string | resource | Imagine\Image\ImageInterface $image, integer $width, integer $height, array $start = [0, 0] ) : Imagine\Image\ImageInterface | ||
$image | string | resource | Imagine\Image\ImageInterface | either ImageInterface, resource or a string containing file path |
$width | integer | the crop width |
$height | integer | the crop height |
$start | array | the starting point. This must be an array with two elements representing `x` and `y` coordinates. |
return | Imagine\Image\ImageInterface |