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
sourceIImageProcessingContextThe image processing context.
operationsIImageProcessor[]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
sourceImageFrame<TPixel>The image frame on which to apply the integral.
Returns
- Buffer2D<ulong>
The Buffer2D<T> containing all the sums.
Type Parameters
TPixelThe 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
sourceImageFrame<TPixel>The image frame on which to apply the integral.
boundsRectangleThe bounds within the image frame to calculate.
Returns
- Buffer2D<ulong>
The Buffer2D<T> containing all the sums.
Type Parameters
TPixelThe 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
sourceImage<TPixel>The image on which to apply the integral.
Returns
- Buffer2D<ulong>
The Buffer2D<T> containing all the sums.
Type Parameters
TPixelThe 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
sourceImage<TPixel>The image on which to apply the integral.
boundsRectangleThe bounds within the image frame to calculate.
Returns
- Buffer2D<ulong>
The Buffer2D<T> containing all the sums.
Type Parameters
TPixelThe 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
sourceImageThe image to clone.
configurationConfigurationThe configuration which allows altering default behaviour or extending the library.
operationAction<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
sourceImageThe image to clone.
operationAction<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
sourceImage<TPixel>The image to clone.
configurationConfigurationThe configuration which allows altering default behaviour or extending the library.
operationsIImageProcessor[]The operations to perform on the clone.
Returns
- Image<TPixel>
The new Image<TPixel>
Type Parameters
TPixelThe 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
sourceImage<TPixel>The image to clone.
configurationConfigurationThe configuration which allows altering default behaviour or extending the library.
operationAction<IImageProcessingContext>The operation to perform on the clone.
Returns
- Image<TPixel>
The new Image<TPixel>
Type Parameters
TPixelThe 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
sourceImage<TPixel>The image to clone.
operationsIImageProcessor[]The operations to perform on the clone.
Returns
- Image<TPixel>
The new Image<TPixel>
Type Parameters
TPixelThe 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
sourceImage<TPixel>The image to clone.
operationAction<IImageProcessingContext>The operation to perform on the clone.
Returns
- Image<TPixel>
The new Image<TPixel>.
Type Parameters
TPixelThe 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
sourceImageThe image to mutate.
configurationConfigurationThe configuration which allows altering default behaviour or extending the library.
operationAction<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
sourceImageThe image to mutate.
operationAction<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
sourceImage<TPixel>The image to mutate.
configurationConfigurationThe configuration which allows altering default behaviour or extending the library.
operationsIImageProcessor[]The operations to perform on the source.
Type Parameters
TPixelThe 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
sourceImage<TPixel>The image to mutate.
configurationConfigurationThe configuration which allows altering default behaviour or extending the library.
operationAction<IImageProcessingContext>The operation to perform on the source.
Type Parameters
TPixelThe 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
sourceImage<TPixel>The image to mutate.
operationsIImageProcessor[]The operations to perform on the source.
Type Parameters
TPixelThe 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
sourceImage<TPixel>The image to mutate.
operationAction<IImageProcessingContext>The operation to perform on the source.
Type Parameters
TPixelThe pixel format.
Exceptions
- ArgumentNullException
The source is null.
- ArgumentNullException
The operation is null.
- ObjectDisposedException
The source has been disposed.
- ImageProcessingException
The processing operation failed.