Table of Contents

Enum ResizeMode

Namespace
SixLabors.ImageSharp.Processing
Assembly
SixLabors.ImageSharp.dll

Provides enumeration over how the image should be resized.

public enum ResizeMode

Fields

BoxPad = 2

Pads the image to fit the bound of the container without resizing the original source. When downscaling, performs the same functionality as Pad

Crop = 0

Crops the resized image to fit the bounds of its container.

Manual = 6

The target location and size of the resized image has been manually set.

Max = 3

Constrains the resized image to fit the bounds of its container maintaining the original aspect ratio.

Min = 4

Resizes the image until the shortest side reaches the set given dimension. Upscaling is disabled in this mode and the original image will be returned if attempted.

Pad = 1

Pads the resized image to fit the bounds of its container. If only one dimension is passed, will maintain the original aspect ratio.

Stretch = 5

Stretches the resized image to fit the bounds of its container.