crop

Crop the image to the given dimension and position.

crop ( ImageInterface &$image, int $cropWidth, int $cropHeight, string $position = 'center', int $offsetX = 0, int $offsetY = 0 ): EditorInterface 
Parameters
image

Instance of Image.

cropWidth

Crop width in pixels.

cropHeight

Crop Height in pixels.

position

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

Number of pixels to add to the X position of the crop.

offsetY

Number of pixels to add to the Y position of the crop.

Returns
An instance of Editor.