$dimensions->fitWidthAndHeight()
Recalculates the dimensions by the width and height
$dimensions->fitWidthAndHeight(int|null $width = null, int|null $height = null, bool $force = false): Kirby\Image\Dimensions
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $width | intornull |
null
|
the max height |
| $height | intornull |
null
|
the max width |
| $force | bool |
false
|
Return type
This method modifies the existing $dimensions object it is applied to and returns it again.