Class ProcessingExtensions
- Namespace
- SixLabors.ImageSharp.Processing
- Assembly
- SixLabors.ImageSharp.dll
Adds extensions that allow the processing of images to the Image<TPixel> type.
public static class ProcessingExtensions
- Inheritance
-
ProcessingExtensions
- Inherited Members
Methods
ApplyProcessors(IImageProcessingContext, params IImageProcessor[])
Applies the given IImageProcessor<TPixel> collection against the context
public static IImageProcessingContext ApplyProcessors(this IImageProcessingContext source, params IImageProcessor[] operations)
Parameters
source
IImageProcessingContextThe image processing context.
operations
IImageProcessor[]The operations to perform on the source.
Returns
- IImageProcessingContext
The IImageProcessor<TPixel> to allow chaining of operations.
Exceptions
- ImageProcessingException
The processing operation failed.
CalculateIntegralImage<TPixel>(ImageFrame<TPixel>)
Apply an image integral.
public static Buffer2D<ulong> CalculateIntegralImage<TPixel>(this ImageFrame<TPixel> source) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
ImageFrame<TPixel>The image frame on which to apply the integral.
Returns
- Buffer2D<ulong>
The Buffer2D<T> containing all the sums.
Type Parameters
TPixel
The type of the pixel.
CalculateIntegralImage<TPixel>(ImageFrame<TPixel>, Rectangle)
Apply an image integral.
public static Buffer2D<ulong> CalculateIntegralImage<TPixel>(this ImageFrame<TPixel> source, Rectangle bounds) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
ImageFrame<TPixel>The image frame on which to apply the integral.
bounds
RectangleThe bounds within the image frame to calculate.
Returns
- Buffer2D<ulong>
The Buffer2D<T> containing all the sums.
Type Parameters
TPixel
The type of the pixel.
CalculateIntegralImage<TPixel>(Image<TPixel>)
Apply an image integral.
public static Buffer2D<ulong> CalculateIntegralImage<TPixel>(this Image<TPixel> source) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
Image<TPixel>The image on which to apply the integral.
Returns
- Buffer2D<ulong>
The Buffer2D<T> containing all the sums.
Type Parameters
TPixel
The type of the pixel.
CalculateIntegralImage<TPixel>(Image<TPixel>, Rectangle)
Apply an image integral.
public static Buffer2D<ulong> CalculateIntegralImage<TPixel>(this Image<TPixel> source, Rectangle bounds) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
Image<TPixel>The image on which to apply the integral.
bounds
RectangleThe bounds within the image frame to calculate.
Returns
- Buffer2D<ulong>
The Buffer2D<T> containing all the sums.
Type Parameters
TPixel
The type of the pixel.
Clone(Image, Configuration, Action<IImageProcessingContext>)
Creates a deep clone of the current image. The clone is then mutated by the given operation.
public static Image Clone(this Image source, Configuration configuration, Action<IImageProcessingContext> operation)
Parameters
source
ImageThe image to clone.
configuration
ConfigurationThe configuration which allows altering default behaviour or extending the library.
operation
Action<IImageProcessingContext>The operation to perform on the clone.
Returns
Exceptions
- ArgumentNullException
The configuration is null.
- ArgumentNullException
The source is null.
- ArgumentNullException
The operation is null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.
Clone(Image, Action<IImageProcessingContext>)
Creates a deep clone of the current image. The clone is then mutated by the given operation.
public static Image Clone(this Image source, Action<IImageProcessingContext> operation)
Parameters
source
ImageThe image to clone.
operation
Action<IImageProcessingContext>The operation to perform on the clone.
Returns
Exceptions
- ArgumentNullException
The source is null.
- ArgumentNullException
The operation is null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.
Clone<TPixel>(Image<TPixel>, Configuration, params IImageProcessor[])
Creates a deep clone of the current image. The clone is then mutated by the given operations.
public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, Configuration configuration, params IImageProcessor[] operations) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
Image<TPixel>The image to clone.
configuration
ConfigurationThe configuration which allows altering default behaviour or extending the library.
operations
IImageProcessor[]The operations to perform on the clone.
Returns
- Image<TPixel>
The new Image<TPixel>
Type Parameters
TPixel
The pixel format.
Exceptions
- ArgumentNullException
The configuration is null.
- ArgumentNullException
The source is null.
- ArgumentNullException
The operations are null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.
Clone<TPixel>(Image<TPixel>, Configuration, Action<IImageProcessingContext>)
Creates a deep clone of the current image. The clone is then mutated by the given operation.
public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, Configuration configuration, Action<IImageProcessingContext> operation) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
Image<TPixel>The image to clone.
configuration
ConfigurationThe configuration which allows altering default behaviour or extending the library.
operation
Action<IImageProcessingContext>The operation to perform on the clone.
Returns
- Image<TPixel>
The new Image<TPixel>
Type Parameters
TPixel
The pixel format.
Exceptions
- ArgumentNullException
The configuration is null.
- ArgumentNullException
The source is null.
- ArgumentNullException
The operation is null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.
Clone<TPixel>(Image<TPixel>, params IImageProcessor[])
Creates a deep clone of the current image. The clone is then mutated by the given operations.
public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, params IImageProcessor[] operations) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
Image<TPixel>The image to clone.
operations
IImageProcessor[]The operations to perform on the clone.
Returns
- Image<TPixel>
The new Image<TPixel>
Type Parameters
TPixel
The pixel format.
Exceptions
- ArgumentNullException
The source is null.
- ArgumentNullException
The operations are null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.
Clone<TPixel>(Image<TPixel>, Action<IImageProcessingContext>)
Creates a deep clone of the current image. The clone is then mutated by the given operation.
public static Image<TPixel> Clone<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext> operation) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
Image<TPixel>The image to clone.
operation
Action<IImageProcessingContext>The operation to perform on the clone.
Returns
- Image<TPixel>
The new Image<TPixel>.
Type Parameters
TPixel
The pixel format.
Exceptions
- ArgumentNullException
The source is null.
- ArgumentNullException
The operation is null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.
Mutate(Image, Configuration, Action<IImageProcessingContext>)
Mutates the source image by applying the image operation to it.
public static void Mutate(this Image source, Configuration configuration, Action<IImageProcessingContext> operation)
Parameters
source
ImageThe image to mutate.
configuration
ConfigurationThe configuration which allows altering default behaviour or extending the library.
operation
Action<IImageProcessingContext>The operation to perform on the source.
Exceptions
- ArgumentNullException
The configuration is null.
- ArgumentNullException
The source is null.
- ArgumentNullException
The operation is null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.
Mutate(Image, Action<IImageProcessingContext>)
Mutates the source image by applying the image operation to it.
public static void Mutate(this Image source, Action<IImageProcessingContext> operation)
Parameters
source
ImageThe image to mutate.
operation
Action<IImageProcessingContext>The operation to perform on the source.
Exceptions
- ArgumentNullException
The source is null.
- ArgumentNullException
The operation is null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.
Mutate<TPixel>(Image<TPixel>, Configuration, params IImageProcessor[])
Mutates the source image by applying the operations to it.
public static void Mutate<TPixel>(this Image<TPixel> source, Configuration configuration, params IImageProcessor[] operations) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
Image<TPixel>The image to mutate.
configuration
ConfigurationThe configuration which allows altering default behaviour or extending the library.
operations
IImageProcessor[]The operations to perform on the source.
Type Parameters
TPixel
The pixel format.
Exceptions
- ArgumentNullException
The configuration is null.
- ArgumentNullException
The source is null.
- ArgumentNullException
The operations are null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.
Mutate<TPixel>(Image<TPixel>, Configuration, Action<IImageProcessingContext>)
Mutates the source image by applying the image operation to it.
public static void Mutate<TPixel>(this Image<TPixel> source, Configuration configuration, Action<IImageProcessingContext> operation) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
Image<TPixel>The image to mutate.
configuration
ConfigurationThe configuration which allows altering default behaviour or extending the library.
operation
Action<IImageProcessingContext>The operation to perform on the source.
Type Parameters
TPixel
The pixel format.
Exceptions
- ArgumentNullException
The configuration is null.
- ArgumentNullException
The source is null.
- ArgumentNullException
The operation is null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.
Mutate<TPixel>(Image<TPixel>, params IImageProcessor[])
Mutates the source image by applying the operations to it.
public static void Mutate<TPixel>(this Image<TPixel> source, params IImageProcessor[] operations) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
Image<TPixel>The image to mutate.
operations
IImageProcessor[]The operations to perform on the source.
Type Parameters
TPixel
The pixel format.
Exceptions
- ArgumentNullException
The source is null.
- ArgumentNullException
The operations are null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.
Mutate<TPixel>(Image<TPixel>, Action<IImageProcessingContext>)
Mutates the source image by applying the image operation to it.
public static void Mutate<TPixel>(this Image<TPixel> source, Action<IImageProcessingContext> operation) where TPixel : unmanaged, IPixel<TPixel>
Parameters
source
Image<TPixel>The image to mutate.
operation
Action<IImageProcessingContext>The operation to perform on the source.
Type Parameters
TPixel
The pixel format.
Exceptions
- ArgumentNullException
The source is null.
- ArgumentNullException
The operation is null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.