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
source
IImageProcessingContextThe 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
source
IImageProcessingContextThe current image processing context.
mode
GrayscaleModeThe 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
source
IImageProcessingContextThe current image processing context.
mode
GrayscaleModeThe formula to apply to perform the operation.
rectangle
RectangleThe 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
source
IImageProcessingContextThe current image processing context.
mode
GrayscaleModeThe formula to apply to perform the operation.
amount
floatThe 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
source
IImageProcessingContextThe current image processing context.
mode
GrayscaleModeThe formula to apply to perform the operation.
amount
floatThe proportion of the conversion. Must be between 0 and 1.
rectangle
RectangleThe 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
source
IImageProcessingContextThe current image processing context.
rectangle
RectangleThe 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
source
IImageProcessingContextThe current image processing context.
amount
floatThe 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
source
IImageProcessingContextThe current image processing context.
amount
floatThe proportion of the conversion. Must be between 0 and 1.
rectangle
RectangleThe Rectangle structure that specifies the portion of the image object to alter.