Table of Contents

Class ResizeProcessor

Namespace
SixLabors.ImageSharp.Processing.Processors.Transforms
Assembly
SixLabors.ImageSharp.dll

Defines an image resizing operation with the given IResampler and dimensional parameters.

public class ResizeProcessor : CloningImageProcessor, ICloningImageProcessor, IImageProcessor
Inheritance
ResizeProcessor
Implements
Inherited Members

Constructors

ResizeProcessor(ResizeOptions, Size)

Initializes a new instance of the ResizeProcessor class.

public ResizeProcessor(ResizeOptions options, Size sourceSize)

Parameters

options ResizeOptions

The resize options.

sourceSize Size

The source image size.

Properties

DestinationHeight

Gets the destination height.

public int DestinationHeight { get; }

Property Value

int

DestinationRectangle

Gets the resize rectangle.

public Rectangle DestinationRectangle { get; }

Property Value

Rectangle

DestinationWidth

Gets the destination width.

public int DestinationWidth { get; }

Property Value

int

Options

Gets the resize options.

public ResizeOptions Options { get; }

Property Value

ResizeOptions

Methods

CreatePixelSpecificCloningProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)

Creates a pixel specific ICloningImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.

public override ICloningImageProcessor<TPixel> CreatePixelSpecificCloningProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle) where TPixel : unmanaged, IPixel<TPixel>

Parameters

configuration Configuration

The configuration which allows altering default behaviour or extending the library.

source Image<TPixel>

The source image. Cannot be null.

sourceRectangle Rectangle

The Rectangle structure that specifies the portion of the image object to draw.

Returns

ICloningImageProcessor<TPixel>

The ICloningImageProcessor<TPixel>

Type Parameters

TPixel

The pixel type.