Table of Contents

Class CloningImageProcessor<TPixel>

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

The base class for all pixel specific cloning image processors. Allows the application of processing algorithms to the image. The image is cloned before operating upon and the buffers swapped upon completion.

public abstract class CloningImageProcessor<TPixel> : ICloningImageProcessor<TPixel>, IImageProcessor<TPixel>, IDisposable where TPixel : unmanaged, IPixel<TPixel>

Type Parameters

TPixel

The pixel format.

Inheritance
CloningImageProcessor<TPixel>
Implements
Inherited Members

Constructors

CloningImageProcessor(Configuration, Image<TPixel>, Rectangle)

Initializes a new instance of the CloningImageProcessor<TPixel> class.

protected CloningImageProcessor(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle)

Parameters

configuration Configuration

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

source Image<TPixel>

The source Image<TPixel> for the current processor instance.

sourceRectangle Rectangle

The source area to process for the current processor instance.

Properties

Configuration

Gets the Configuration instance to use when performing operations.

protected Configuration Configuration { get; }

Property Value

Configuration

Source

Gets The source Image<TPixel> for the current processor instance.

protected Image<TPixel> Source { get; }

Property Value

Image<TPixel>

SourceRectangle

Gets The source area to process for the current processor instance.

protected Rectangle SourceRectangle { get; }

Property Value

Rectangle

Methods

AfterFrameApply(ImageFrame<TPixel>, ImageFrame<TPixel>)

This method is called after the process is applied to prepare the processor.

protected virtual void AfterFrameApply(ImageFrame<TPixel> source, ImageFrame<TPixel> destination)

Parameters

source ImageFrame<TPixel>

The source image. Cannot be null.

destination ImageFrame<TPixel>

The cloned/destination image. Cannot be null.

AfterImageApply(Image<TPixel>)

This method is called after the process is applied to prepare the processor.

protected virtual void AfterImageApply(Image<TPixel> destination)

Parameters

destination Image<TPixel>

The cloned/destination image. Cannot be null.

BeforeFrameApply(ImageFrame<TPixel>, ImageFrame<TPixel>)

This method is called before the process is applied to prepare the processor.

protected virtual void BeforeFrameApply(ImageFrame<TPixel> source, ImageFrame<TPixel> destination)

Parameters

source ImageFrame<TPixel>

The source image. Cannot be null.

destination ImageFrame<TPixel>

The cloned/destination image. Cannot be null.

BeforeImageApply(Image<TPixel>)

This method is called before the process is applied to prepare the processor.

protected virtual void BeforeImageApply(Image<TPixel> destination)

Parameters

destination Image<TPixel>

The cloned/destination image. Cannot be null.

Dispose()

public void Dispose()

Dispose(bool)

Disposes the object and frees resources for the Garbage Collector.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Whether to dispose managed and unmanaged objects.

GetDestinationSize()

Gets the size of the destination image.

protected abstract Size GetDestinationSize()

Returns

Size

The Size.

OnFrameApply(ImageFrame<TPixel>, ImageFrame<TPixel>)

Applies the process to the specified portion of the specified ImageFrame<TPixel> at the specified location and with the specified size.

protected abstract void OnFrameApply(ImageFrame<TPixel> source, ImageFrame<TPixel> destination)

Parameters

source ImageFrame<TPixel>

The source image. Cannot be null.

destination ImageFrame<TPixel>

The cloned/destination image. Cannot be null.