Skip to content

Kirby 5.0.0

$dimensions->crop()

Crops the dimensions by width and height

$dimensions->crop(int $width, int|null $height = null): Kirby\Image\Dimensions

Parameters

Name Type Default
$widthrequired int no default value
$height intornull null

Return type

Kirby\Image\Dimensions

This method modifies the existing $ object it is applied to and returns it again.

Parent class

Kirby\Image\Dimensions