TransformOptions Class

public sealed class TransformOptions

Constructors

NameDescription
TransformOptions()

TransformOptions()

TransformOptions.cs
public TransformOptions()

No documentation is available.

Properties

NameDescription
BackgroundColorGets the color of the canvas where the transformed image does not reach. Defaults to transparent black. A pixel format without alpha needs an opaque color, unless no pixel of the result reads beyond the image.
CanvasModeGets how the size of the canvas is chosen. Defaults to TransformCanvasMode.Expand.
CanvasSizeGets the size of the canvas of TransformCanvasMode.Explicit, which requires a size that is not empty. It is not used by the other modes. Defaults to Size.Empty.
DefaultGets the default options: bicubic filter, transparent background, expanded canvas, encoded samples.
FilterGets the resampling kernel. Defaults to ResamplingFilter.Bicubic.
WorkingSpaceGets the numeric space used for filtering. Defaults to ResizeWorkingSpace.Encoded.

BackgroundColor

TransformOptions.cs

Gets the color of the canvas where the transformed image does not reach. Defaults to transparent black. A pixel format without alpha needs an opaque color, unless no pixel of the result reads beyond the image.

public Rgba64 BackgroundColor { get; init; }

Property value

Rgba64

Gets how the size of the canvas is chosen. Defaults to TransformCanvasMode.Expand.

public TransformCanvasMode CanvasMode { get; init; }

Property value

TransformCanvasMode

Exceptions

ArgumentOutOfRangeException
The value is not a defined TransformCanvasMode.

Gets the size of the canvas of TransformCanvasMode.Explicit, which requires a size that is not empty. It is not used by the other modes. Defaults to Size.Empty.

public Size CanvasSize { get; init; }

Property value

Size

Gets the default options: bicubic filter, transparent background, expanded canvas, encoded samples.

public static TransformOptions Default { get; }

Property value

TransformOptions

Gets the resampling kernel. Defaults to ResamplingFilter.Bicubic.

public ResamplingFilter Filter { get; init; }

Property value

ResamplingFilter

Exceptions

ArgumentOutOfRangeException
The value is not a defined ResamplingFilter.

Gets the numeric space used for filtering. Defaults to ResizeWorkingSpace.Encoded.

public ResizeWorkingSpace WorkingSpace { get; init; }

Property value

ResizeWorkingSpace

Exceptions

ArgumentOutOfRangeException
The value is not a defined ResizeWorkingSpace.