Table of Contents

Class PadExtensions

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

Defines extensions that allow the application of padding operations on an Image using Mutate/Clone.

public static class PadExtensions
Inheritance
PadExtensions
Inherited Members

Methods

Pad(IImageProcessingContext, int, int)

Evenly pads an image to fit the new dimensions.

public static IImageProcessingContext Pad(this IImageProcessingContext source, int width, int height)

Parameters

source IImageProcessingContext

The current image processing context.

width int

The new width.

height int

The new height.

Returns

IImageProcessingContext

The IImageProcessingContext.

Pad(IImageProcessingContext, int, int, Color)

Evenly pads an image to fit the new dimensions with the given background color.

public static IImageProcessingContext Pad(this IImageProcessingContext source, int width, int height, Color color)

Parameters

source IImageProcessingContext

The current image processing context.

width int

The new width.

height int

The new height.

color Color

The background color with which to pad the image.

Returns

IImageProcessingContext

The IImageProcessingContext.