Class GrayscaleExtensions
- Namespace
- SixLabors.ImageSharp.Processing
- Assembly
- SixLabors.ImageSharp.dll
Defines extensions that allow the application of grayscale toning to an Image using Mutate/Clone.
public static class GrayscaleExtensions
- Inheritance
-
GrayscaleExtensions
- Inherited Members
Methods
Grayscale(IImageProcessingContext)
Applies Bt709 grayscale toning to the image.
public static IImageProcessingContext Grayscale(this IImageProcessingContext source)
Parameters
sourceIImageProcessingContextThe current image processing context.
Returns
Grayscale(IImageProcessingContext, GrayscaleMode)
Applies grayscale toning to the image with the given GrayscaleMode.
public static IImageProcessingContext Grayscale(this IImageProcessingContext source, GrayscaleMode mode)
Parameters
sourceIImageProcessingContextThe current image processing context.
modeGrayscaleModeThe formula to apply to perform the operation.
Returns
Grayscale(IImageProcessingContext, GrayscaleMode, Rectangle)
Applies grayscale toning to the image.
public static IImageProcessingContext Grayscale(this IImageProcessingContext source, GrayscaleMode mode, Rectangle rectangle)
Parameters
sourceIImageProcessingContextThe current image processing context.
modeGrayscaleModeThe formula to apply to perform the operation.
rectangleRectangleThe Rectangle structure that specifies the portion of the image object to alter.
Returns
Grayscale(IImageProcessingContext, GrayscaleMode, float)
Applies grayscale toning to the image with the given GrayscaleMode using the given amount.
public static IImageProcessingContext Grayscale(this IImageProcessingContext source, GrayscaleMode mode, float amount)
Parameters
sourceIImageProcessingContextThe current image processing context.
modeGrayscaleModeThe formula to apply to perform the operation.
amountfloatThe proportion of the conversion. Must be between 0 and 1.
Returns
Grayscale(IImageProcessingContext, GrayscaleMode, float, Rectangle)
Applies grayscale toning to the image using the given amount.
public static IImageProcessingContext Grayscale(this IImageProcessingContext source, GrayscaleMode mode, float amount, Rectangle rectangle)
Parameters
sourceIImageProcessingContextThe current image processing context.
modeGrayscaleModeThe formula to apply to perform the operation.
amountfloatThe proportion of the conversion. Must be between 0 and 1.
rectangleRectangleThe Rectangle structure that specifies the portion of the image object to alter.
Returns
Grayscale(IImageProcessingContext, Rectangle)
Applies Bt709 grayscale toning to the image.
public static IImageProcessingContext Grayscale(this IImageProcessingContext source, Rectangle rectangle)
Parameters
sourceIImageProcessingContextThe current image processing context.
rectangleRectangleThe Rectangle structure that specifies the portion of the image object to alter.
Returns
Grayscale(IImageProcessingContext, float)
Applies Bt709 grayscale toning to the image using the given amount.
public static IImageProcessingContext Grayscale(this IImageProcessingContext source, float amount)
Parameters
sourceIImageProcessingContextThe current image processing context.
amountfloatThe proportion of the conversion. Must be between 0 and 1.
Returns
Grayscale(IImageProcessingContext, float, Rectangle)
Applies Bt709 grayscale toning to the image using the given amount.
public static IImageProcessingContext Grayscale(this IImageProcessingContext source, float amount, Rectangle rectangle)
Parameters
sourceIImageProcessingContextThe current image processing context.
amountfloatThe proportion of the conversion. Must be between 0 and 1.
rectangleRectangleThe Rectangle structure that specifies the portion of the image object to alter.