# Dimensions

The Dimension class is used to provide additional methods for images and possibly other objects with width and height to recalculate the size, get the ratio or just the width and height.

****

- Full class name: `Kirby\Image\Dimensions`
- Alias: `Dimensions`
- Source: <https://github.com/getkirby/kirby/tree/5.5.3/src/Image/Dimensions.php#L20>

****

### Dimensions

- [new Dimensions()](https://getkirby.com/docs/reference/objects/image/dimensions/__construct.md)
- [$dimensions->__debugInfo()](https://getkirby.com/docs/reference/objects/image/dimensions/__debug-info.md)
- [$dimensions->__toString()](https://getkirby.com/docs/reference/objects/image/dimensions/__to-string.md)
- [$dimensions->crop()](https://getkirby.com/docs/reference/objects/image/dimensions/crop.md)
- [$dimensions->fit()](https://getkirby.com/docs/reference/objects/image/dimensions/fit.md)
- [$dimensions->fitHeight()](https://getkirby.com/docs/reference/objects/image/dimensions/fit-height.md)
- [$dimensions->fitWidth()](https://getkirby.com/docs/reference/objects/image/dimensions/fit-width.md)
- [$dimensions->fitWidthAndHeight()](https://getkirby.com/docs/reference/objects/image/dimensions/fit-width-and-height.md)
- [Dimensions::forImage()](https://getkirby.com/docs/reference/objects/image/dimensions/for-image.md)
- [Dimensions::forSvg()](https://getkirby.com/docs/reference/objects/image/dimensions/for-svg.md)
- [$dimensions->height()](https://getkirby.com/docs/reference/objects/image/dimensions/height.md)
- [$dimensions->landscape()](https://getkirby.com/docs/reference/objects/image/dimensions/landscape.md)
- [$dimensions->orientation()](https://getkirby.com/docs/reference/objects/image/dimensions/orientation.md)
- [$dimensions->portrait()](https://getkirby.com/docs/reference/objects/image/dimensions/portrait.md)
- [$dimensions->ratio()](https://getkirby.com/docs/reference/objects/image/dimensions/ratio.md)
- [$dimensions->resize()](https://getkirby.com/docs/reference/objects/image/dimensions/resize.md)
- [$dimensions->square()](https://getkirby.com/docs/reference/objects/image/dimensions/square.md)
- [$dimensions->thumb()](https://getkirby.com/docs/reference/objects/image/dimensions/thumb.md)
- [$dimensions->toArray()](https://getkirby.com/docs/reference/objects/image/dimensions/to-array.md)
- [$dimensions->width()](https://getkirby.com/docs/reference/objects/image/dimensions/width.md)