public crop ( grafika\ImageInterface &$image, integer $cropWidth, integer $cropHeight, string $position = 'center', integer $offsetX, integer $offsetY ) : grafika\EditorInterface | ||
$image | grafika\ImageInterface | Instance of Image. |
$cropWidth | integer | Crop width in pixels. |
$cropHeight | integer | Crop Height in pixels. |
$position | string | The crop position. Possible values top-left, top-center, top-right, center-left, center, center-right, bottom-left, bottom-center, bottom-right and smart. Defaults to center. |
$offsetX | integer | Number of pixels to add to the X position of the crop. |
$offsetY | integer | Number of pixels to add to the Y position of the crop. |
return | grafika\EditorInterface | An instance of Editor. |