Resizes the image to a certain width and height. No resizing will be performed if
both width and height are set to null.
- Namespace
- Statiq.Images
- Containing Type
- MutateImage
Syntax
public MutateImage Resize(int? width, int? height, AnchorPositionMode anchor = null, ResizeMode mode = null)
Parameters
| Name |
Type |
Description |
| width |
int? |
The desired width. If set to null or 0, the image will maintain it's original aspect ratio. |
| height |
int? |
The desired height. If set to null or 0, the image will maintain it's original aspect ratio. |
| anchor |
AnchorPositionMode |
The anchor position to use (if necessary). |
| mode |
ResizeMode |
The resize mode to use. |
Return Value
| Type |
Description |
| MutateImage |
The current module instance. |