Browse Source

Fix docs for processing extensions

af/merge-core
Anton Firszov 7 years ago
parent
commit
f4e497de5a
  1. 3
      src/ImageSharp/Processing/AutoOrientExtensions.cs
  2. 3
      src/ImageSharp/Processing/BackgroundColorExtensions.cs
  3. 11
      src/ImageSharp/Processing/BinaryDiffuseExtensions.cs
  4. 11
      src/ImageSharp/Processing/BinaryDitherExtensions.cs
  5. 11
      src/ImageSharp/Processing/BinaryThresholdExtensions.cs
  6. 7
      src/ImageSharp/Processing/BlackWhiteExtensions.cs
  7. 9
      src/ImageSharp/Processing/BoxBlurExtensions.cs
  8. 7
      src/ImageSharp/Processing/BrightnessExtensions.cs
  9. 8
      src/ImageSharp/Processing/ColorBlindnessExtensions.cs
  10. 8
      src/ImageSharp/Processing/ContrastExtensions.cs
  11. 7
      src/ImageSharp/Processing/CropExtensions.cs
  12. 16
      src/ImageSharp/Processing/DetectEdgesExtensions.cs
  13. 15
      src/ImageSharp/Processing/DiffuseExtensions.cs
  14. 13
      src/ImageSharp/Processing/DitherExtensions.cs
  15. 7
      src/ImageSharp/Processing/EntropyCropExtensions.cs
  16. 7
      src/ImageSharp/Processing/FilterExtensions.cs
  17. 5
      src/ImageSharp/Processing/FlipExtensions.cs
  18. 9
      src/ImageSharp/Processing/GaussianBlurExtensions.cs
  19. 9
      src/ImageSharp/Processing/GaussianSharpenExtensions.cs
  20. 27
      src/ImageSharp/Processing/GlowExtensions.cs
  21. 3
      src/ImageSharp/Processing/GrayscaleExtensions.cs
  22. 6
      src/ImageSharp/Processing/HistogramEqualizationExtension.cs
  23. 7
      src/ImageSharp/Processing/HueExtensions.cs
  24. 7
      src/ImageSharp/Processing/InvertExtensions.cs
  25. 7
      src/ImageSharp/Processing/KodachromeExtensions.cs
  26. 7
      src/ImageSharp/Processing/LomographExtensions.cs
  27. 11
      src/ImageSharp/Processing/OilPaintExtensions.cs
  28. 7
      src/ImageSharp/Processing/OpacityExtensions.cs
  29. 5
      src/ImageSharp/Processing/PadExtensions.cs
  30. 9
      src/ImageSharp/Processing/PixelateExtensions.cs
  31. 7
      src/ImageSharp/Processing/PolaroidExtensions.cs
  32. 7
      src/ImageSharp/Processing/QuantizeExtensions.cs
  33. 23
      src/ImageSharp/Processing/ResizeExtensions.cs
  34. 9
      src/ImageSharp/Processing/RotateExtensions.cs
  35. 5
      src/ImageSharp/Processing/RotateFlipExtensions.cs
  36. 7
      src/ImageSharp/Processing/SaturateExtensions.cs
  37. 11
      src/ImageSharp/Processing/SepiaExtensions.cs
  38. 7
      src/ImageSharp/Processing/SkewExtensions.cs
  39. 17
      src/ImageSharp/Processing/TransformExtensions.cs
  40. 23
      src/ImageSharp/Processing/VignetteExtensions.cs

3
src/ImageSharp/Processing/AutoOrientExtensions.cs

@ -7,7 +7,8 @@ using SixLabors.ImageSharp.Processing.Processors.Transforms;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of auto-orientation operations to the <see cref="Image{TPixel}"/> type.
/// Defines extensions that allow the application of auto-orientation operations to an <see cref="Image{TPixel}"/>
/// using Mutate/Clone.
/// </summary>
public static class AutoOrientExtensions
{

3
src/ImageSharp/Processing/BackgroundColorExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of a background color to the <see cref="Image{TPixel}"/> type.
/// Defines extension methods to replace the background color of an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class BackgroundColorExtensions
{

11
src/ImageSharp/Processing/BinaryDiffuseExtensions.cs

@ -9,7 +9,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds binary diffusion extensions to the <see cref="Image{TPixel}"/> type.
/// Defines extension methods to apply binary diffusion on an <see cref="Image{TPixel}"/>
/// using Mutate/Clone.
/// </summary>
public static class BinaryDiffuseExtensions
{
@ -20,7 +21,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image this method extends.</param>
/// <param name="diffuser">The diffusion algorithm to apply.</param>
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryDiffuse<TPixel>(this IImageProcessingContext<TPixel> source, IErrorDiffuser diffuser, float threshold)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryErrorDiffusionProcessor<TPixel>(diffuser, threshold));
@ -35,7 +36,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryDiffuse<TPixel>(this IImageProcessingContext<TPixel> source, IErrorDiffuser diffuser, float threshold, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryErrorDiffusionProcessor<TPixel>(diffuser, threshold), rectangle);
@ -49,7 +50,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
/// <param name="upperColor">The color to use for pixels that are above the threshold.</param>
/// <param name="lowerColor">The color to use for pixels that are below the threshold</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryDiffuse<TPixel>(this IImageProcessingContext<TPixel> source, IErrorDiffuser diffuser, float threshold, TPixel upperColor, TPixel lowerColor)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryErrorDiffusionProcessor<TPixel>(diffuser, threshold, upperColor, lowerColor));
@ -66,7 +67,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryDiffuse<TPixel>(this IImageProcessingContext<TPixel> source, IErrorDiffuser diffuser, float threshold, TPixel upperColor, TPixel lowerColor, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryErrorDiffusionProcessor<TPixel>(diffuser, threshold, upperColor, lowerColor), rectangle);

11
src/ImageSharp/Processing/BinaryDitherExtensions.cs

@ -9,7 +9,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds binary dithering extensions to the <see cref="Image{TPixel}"/> type.
/// Defines extensions to apply binary dithering on an <see cref="Image{TPixel}"/>
/// using Mutate/Clone.
/// </summary>
public static class BinaryDitherExtensions
{
@ -19,7 +20,7 @@ namespace SixLabors.ImageSharp.Processing
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="dither">The ordered ditherer.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryDither<TPixel>(this IImageProcessingContext<TPixel> source, IOrderedDither dither)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryOrderedDitherProcessor<TPixel>(dither));
@ -32,7 +33,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="dither">The ordered ditherer.</param>
/// <param name="upperColor">The color to use for pixels that are above the threshold.</param>
/// <param name="lowerColor">The color to use for pixels that are below the threshold</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryDither<TPixel>(this IImageProcessingContext<TPixel> source, IOrderedDither dither, TPixel upperColor, TPixel lowerColor)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryOrderedDitherProcessor<TPixel>(dither, upperColor, lowerColor));
@ -46,7 +47,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryDither<TPixel>(this IImageProcessingContext<TPixel> source, IOrderedDither dither, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryOrderedDitherProcessor<TPixel>(dither), rectangle);
@ -62,7 +63,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryDither<TPixel>(this IImageProcessingContext<TPixel> source, IOrderedDither dither, TPixel upperColor, TPixel lowerColor, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryOrderedDitherProcessor<TPixel>(dither, upperColor, lowerColor), rectangle);

11
src/ImageSharp/Processing/BinaryThresholdExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds binary thresholding extensions to the <see cref="Image{TPixel}"/> type.
/// Defines extension methods to apply binary thresholding on an <see cref="Image{TPixel}"/>
/// using Mutate/Clone.
/// </summary>
public static class BinaryThresholdExtensions
{
@ -18,7 +19,7 @@ namespace SixLabors.ImageSharp.Processing
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryThreshold<TPixel>(this IImageProcessingContext<TPixel> source, float threshold)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryThresholdProcessor<TPixel>(threshold));
@ -32,7 +33,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryThreshold<TPixel>(this IImageProcessingContext<TPixel> source, float threshold, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryThresholdProcessor<TPixel>(threshold), rectangle);
@ -45,7 +46,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
/// <param name="upperColor">The color to use for pixels that are above the threshold.</param>
/// <param name="lowerColor">The color to use for pixels that are below the threshold</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryThreshold<TPixel>(this IImageProcessingContext<TPixel> source, float threshold, TPixel upperColor, TPixel lowerColor)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryThresholdProcessor<TPixel>(threshold, upperColor, lowerColor));
@ -61,7 +62,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> BinaryThreshold<TPixel>(this IImageProcessingContext<TPixel> source, float threshold, TPixel upperColor, TPixel lowerColor, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new BinaryThresholdProcessor<TPixel>(threshold, upperColor, lowerColor), rectangle);

7
src/ImageSharp/Processing/BlackWhiteExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of black and white toning to the <see cref="Image{TPixel}"/> type.
/// Defines extension methods that allow the application of black and white toning to an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class BlackWhiteExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// Applies black and white toning to the image.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext BlackWhite(this IImageProcessingContext source)
=> source.ApplyProcessor(new BlackWhiteProcessor());
@ -27,7 +28,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext BlackWhite(this IImageProcessingContext source, Rectangle rectangle)
=> source.ApplyProcessor(new BlackWhiteProcessor(), rectangle);
}

9
src/ImageSharp/Processing/BoxBlurExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds box blurring extensions to the <see cref="Image"/> type.
/// Defines extensions methods to apply box blurring to an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class BoxBlurExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// Applies a box blur to the image.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext BoxBlur(this IImageProcessingContext source)
=> source.ApplyProcessor(new BoxBlurProcessor());
@ -25,7 +26,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="radius">The 'radius' value representing the size of the area to sample.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext BoxBlur(this IImageProcessingContext source, int radius)
=> source.ApplyProcessor(new BoxBlurProcessor(radius));
@ -37,7 +38,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext BoxBlur(this IImageProcessingContext source, int radius, Rectangle rectangle)
=> source.ApplyProcessor(new BoxBlurProcessor(radius), rectangle);
}

7
src/ImageSharp/Processing/BrightnessExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the alteration of the brightness component to the <see cref="Image{TPixel}"/> type.
/// Defines extensions that allow the alteration of the brightness component of an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class BrightnessExtensions
{
@ -21,7 +22,7 @@ namespace SixLabors.ImageSharp.Processing
/// </remarks>
/// <param name="source">The image this method extends.</param>
/// <param name="amount">The proportion of the conversion. Must be greater than or equal to 0.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Brightness(this IImageProcessingContext source, float amount)
=> source.ApplyProcessor(new BrightnessProcessor(amount));
@ -37,7 +38,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Brightness(this IImageProcessingContext source, float amount, Rectangle rectangle)
=> source.ApplyProcessor(new BrightnessProcessor(amount), rectangle);
}

8
src/ImageSharp/Processing/ColorBlindnessExtensions.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing.Processors;
using SixLabors.ImageSharp.Processing.Processors.Filters;
using SixLabors.Primitives;
@ -9,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that simulate the effects of various color blindness disorders to the <see cref="Image{TPixel}"/> type.
/// Defines extensions that simulate the effects of various color blindness disorders on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class ColorBlindnessExtensions
{
@ -18,7 +18,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="colorBlindness">The type of color blindness simulator to apply.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext ColorBlindness(this IImageProcessingContext source, ColorBlindnessMode colorBlindness)
=> source.ApplyProcessor(GetProcessor(colorBlindness));
@ -30,7 +30,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext ColorBlindness(this IImageProcessingContext source, ColorBlindnessMode colorBlindnessMode, Rectangle rectangle)
=> source.ApplyProcessor(GetProcessor(colorBlindnessMode), rectangle);

8
src/ImageSharp/Processing/ContrastExtensions.cs

@ -1,14 +1,14 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing.Processors.Filters;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the alteration of the contrast component to the <see cref="Image"/> type.
/// Defines extensions that allow the alteration of the contrast component of an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class ContrastExtensions
{
@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Processing
/// </remarks>
/// <param name="source">The image this method extends.</param>
/// <param name="amount">The proportion of the conversion. Must be greater than or equal to 0.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Contrast(this IImageProcessingContext source, float amount)
=> source.ApplyProcessor(new ContrastProcessor(amount));
@ -37,7 +37,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Contrast(this IImageProcessingContext source, float amount, Rectangle rectangle)
=> source.ApplyProcessor(new ContrastProcessor(amount), rectangle);
}

7
src/ImageSharp/Processing/CropExtensions.cs

@ -7,7 +7,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of cropping operations to the <see cref="Image"/> type.
/// Defines extensions that allow the application of cropping operations on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class CropExtensions
{
@ -17,7 +18,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image to resize.</param>
/// <param name="width">The target image width.</param>
/// <param name="height">The target image height.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Crop(this IImageProcessingContext source, int width, int height) =>
Crop(source, new Rectangle(0, 0, width, height));
@ -28,7 +29,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="cropRectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to retain.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Crop(this IImageProcessingContext source, Rectangle cropRectangle) =>
source.ApplyProcessor(new CropProcessor(cropRectangle, source.GetCurrentSize()));
}

16
src/ImageSharp/Processing/DetectEdgesExtensions.cs

@ -8,7 +8,7 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds edge detection extensions to the <see cref="Image"/> type.
/// Defines edge detection extensions applicable on an <see cref="Image"/> using Mutate/Clone.
/// </summary>
public static class DetectEdgesExtensions
{
@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// operating in grayscale mode.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext DetectEdges(this IImageProcessingContext source) =>
DetectEdges(source, new SobelProcessor(true));
@ -29,7 +29,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext DetectEdges(this IImageProcessingContext source, Rectangle rectangle) =>
DetectEdges(source, rectangle, new SobelProcessor(true));
@ -38,7 +38,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="filter">The filter for detecting edges.</param>
/// <returns>The <see cref="Image"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
EdgeDetectionOperators filter) =>
@ -50,7 +50,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image this method extends.</param>
/// <param name="filter">The filter for detecting edges.</param>
/// <param name="grayscale">Whether to convert the image to grayscale first. Defaults to true.</param>
/// <returns>The <see cref="Image"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
EdgeDetectionOperators filter,
@ -66,7 +66,7 @@ namespace SixLabors.ImageSharp.Processing
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <param name="grayscale">Whether to convert the image to grayscale first. Defaults to true.</param>
/// <returns>The <see cref="Image"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
EdgeDetectionOperators filter,
@ -79,7 +79,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="filter">The filter for detecting edges.</param>
/// <returns>The <see cref="Image"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
private static IImageProcessingContext DetectEdges(this IImageProcessingContext source, IImageProcessor filter)
{
return source.ApplyProcessor(filter);
@ -93,7 +93,7 @@ namespace SixLabors.ImageSharp.Processing
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <param name="filter">The filter for detecting edges.</param>
/// <returns>The <see cref="Image"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
private static IImageProcessingContext DetectEdges(
this IImageProcessingContext source,
Rectangle rectangle,

15
src/ImageSharp/Processing/DiffuseExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing.Dithering
{
/// <summary>
/// Adds diffusion extensions to the <see cref="Image{TPixel}"/> type.
/// Defines extension methods to apply diffusion to an <see cref="Image{TPixel}"/>
/// using Mutate/Clone.
/// </summary>
public static class DiffuseExtensions
{
@ -17,7 +18,7 @@ namespace SixLabors.ImageSharp.Processing.Dithering
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Diffuse<TPixel>(this IImageProcessingContext<TPixel> source)
where TPixel : struct, IPixel<TPixel>
=> Diffuse(source, KnownDiffusers.FloydSteinberg, .5F);
@ -28,7 +29,7 @@ namespace SixLabors.ImageSharp.Processing.Dithering
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Diffuse<TPixel>(this IImageProcessingContext<TPixel> source, float threshold)
where TPixel : struct, IPixel<TPixel>
=> Diffuse(source, KnownDiffusers.FloydSteinberg, threshold);
@ -40,7 +41,7 @@ namespace SixLabors.ImageSharp.Processing.Dithering
/// <param name="source">The image this method extends.</param>
/// <param name="diffuser">The diffusion algorithm to apply.</param>
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Diffuse<TPixel>(this IImageProcessingContext<TPixel> source, IErrorDiffuser diffuser, float threshold)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new ErrorDiffusionPaletteProcessor<TPixel>(diffuser, threshold));
@ -55,7 +56,7 @@ namespace SixLabors.ImageSharp.Processing.Dithering
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Diffuse<TPixel>(this IImageProcessingContext<TPixel> source, IErrorDiffuser diffuser, float threshold, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new ErrorDiffusionPaletteProcessor<TPixel>(diffuser, threshold), rectangle);
@ -68,7 +69,7 @@ namespace SixLabors.ImageSharp.Processing.Dithering
/// <param name="diffuser">The diffusion algorithm to apply.</param>
/// <param name="threshold">The threshold to apply binarization of the image. Must be between 0 and 1.</param>
/// <param name="palette">The palette to select substitute colors from.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Diffuse<TPixel>(this IImageProcessingContext<TPixel> source, IErrorDiffuser diffuser, float threshold, TPixel[] palette)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new ErrorDiffusionPaletteProcessor<TPixel>(diffuser, threshold, palette));
@ -84,7 +85,7 @@ namespace SixLabors.ImageSharp.Processing.Dithering
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Diffuse<TPixel>(this IImageProcessingContext<TPixel> source, IErrorDiffuser diffuser, float threshold, TPixel[] palette, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new ErrorDiffusionPaletteProcessor<TPixel>(diffuser, threshold, palette), rectangle);

13
src/ImageSharp/Processing/DitherExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds dithering extensions to the <see cref="Image{TPixel}"/> type.
/// Defines dithering extensions to apply on an <see cref="Image{TPixel}"/>
/// using Mutate/Clone.
/// </summary>
public static class DitherExtensions
{
@ -17,7 +18,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Dither<TPixel>(this IImageProcessingContext<TPixel> source)
where TPixel : struct, IPixel<TPixel>
=> Dither(source, KnownDitherers.BayerDither4x4);
@ -28,7 +29,7 @@ namespace SixLabors.ImageSharp.Processing
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="dither">The ordered ditherer.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Dither<TPixel>(this IImageProcessingContext<TPixel> source, IOrderedDither dither)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new OrderedDitherPaletteProcessor<TPixel>(dither));
@ -40,7 +41,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image this method extends.</param>
/// <param name="dither">The ordered ditherer.</param>
/// <param name="palette">The palette to select substitute colors from.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Dither<TPixel>(this IImageProcessingContext<TPixel> source, IOrderedDither dither, TPixel[] palette)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new OrderedDitherPaletteProcessor<TPixel>(dither, palette));
@ -54,7 +55,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Dither<TPixel>(this IImageProcessingContext<TPixel> source, IOrderedDither dither, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new OrderedDitherPaletteProcessor<TPixel>(dither), rectangle);
@ -69,7 +70,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext{TPixel}"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Dither<TPixel>(this IImageProcessingContext<TPixel> source, IOrderedDither dither, TPixel[] palette, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new OrderedDitherPaletteProcessor<TPixel>(dither, palette), rectangle);

7
src/ImageSharp/Processing/EntropyCropExtensions.cs

@ -6,7 +6,8 @@ using SixLabors.ImageSharp.Processing.Processors.Transforms;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of entropy cropping operations to the <see cref="Image"/> type.
/// Defines extensions that allow the application of entropy cropping operations on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class EntropyCropExtensions
{
@ -14,7 +15,7 @@ namespace SixLabors.ImageSharp.Processing
/// Crops an image to the area of greatest entropy using a threshold for entropic density of <value>.5F</value>.
/// </summary>
/// <param name="source">The image to crop.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext EntropyCrop(this IImageProcessingContext source) =>
source.ApplyProcessor(new EntropyCropProcessor());
@ -23,7 +24,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image to crop.</param>
/// <param name="threshold">The threshold for entropic density.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext EntropyCrop(this IImageProcessingContext source, float threshold) =>
source.ApplyProcessor(new EntropyCropProcessor(threshold));
}

7
src/ImageSharp/Processing/FilterExtensions.cs

@ -9,7 +9,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of composable filters to the <see cref="Image{TPixel}"/> type.
/// Defines extensions that allow the application of composable filters to an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class FilterExtensions
{
@ -18,7 +19,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="matrix">The filter color matrix</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Filter(this IImageProcessingContext source, ColorMatrix matrix)
=> source.ApplyProcessor(new FilterProcessor(matrix));
@ -30,7 +31,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Filter(this IImageProcessingContext source, ColorMatrix matrix, Rectangle rectangle)
=> source.ApplyProcessor(new FilterProcessor(matrix), rectangle);
}

5
src/ImageSharp/Processing/FlipExtensions.cs

@ -6,7 +6,8 @@ using SixLabors.ImageSharp.Processing.Processors.Transforms;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of flipping operations to the <see cref="Image"/> type.
/// Defines extensions that allow the application of flipping operations on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class FlipExtensions
{
@ -15,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image to rotate, flip, or both.</param>
/// <param name="flipMode">The <see cref="FlipMode"/> to perform the flip.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Flip(this IImageProcessingContext source, FlipMode flipMode)
=> source.ApplyProcessor(new FlipProcessor(flipMode));
}

9
src/ImageSharp/Processing/GaussianBlurExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds Gaussian blurring extensions to the <see cref="Image"/> type.
/// Defines Gaussian blurring extensions to apply on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class GaussianBlurExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// Applies a Gaussian blur to the image.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext GaussianBlur(this IImageProcessingContext source)
=> source.ApplyProcessor(new GaussianBlurProcessor());
@ -25,7 +26,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="sigma">The 'sigma' value representing the weight of the blur.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext GaussianBlur(this IImageProcessingContext source, float sigma)
=> source.ApplyProcessor(new GaussianBlurProcessor(sigma));
@ -37,7 +38,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext GaussianBlur(this IImageProcessingContext source, float sigma, Rectangle rectangle)
=> source.ApplyProcessor(new GaussianBlurProcessor(sigma), rectangle);
}

9
src/ImageSharp/Processing/GaussianSharpenExtensions.cs

@ -7,7 +7,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds Gaussian sharpening extensions to the <see cref="Image"/> type.
/// Defines Gaussian sharpening extensions to apply on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class GaussianSharpenExtensions
{
@ -15,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing
/// Applies a Gaussian sharpening filter to the image.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext GaussianSharpen(this IImageProcessingContext source) =>
source.ApplyProcessor(new GaussianSharpenProcessor());
@ -24,7 +25,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="sigma">The 'sigma' value representing the weight of the blur.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext GaussianSharpen(this IImageProcessingContext source, float sigma) =>
source.ApplyProcessor(new GaussianSharpenProcessor(sigma));
@ -36,7 +37,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext GaussianSharpen(
this IImageProcessingContext source,
float sigma,

27
src/ImageSharp/Processing/GlowExtensions.cs

@ -9,7 +9,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of a radial glow to the <see cref="Image{TPixel}"/> type.
/// Defines extensions that allow the application of a radial glow on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class GlowExtensions
{
@ -18,7 +19,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source)
where TPixel : struct, IPixel<TPixel>
=> Glow(source, GraphicsOptions.Default);
@ -29,7 +30,7 @@ namespace SixLabors.ImageSharp.Processing
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="color">The color to set as the glow.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, TPixel color)
where TPixel : struct, IPixel<TPixel>
{
@ -42,7 +43,7 @@ namespace SixLabors.ImageSharp.Processing
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="radius">The the radius.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, float radius)
where TPixel : struct, IPixel<TPixel>
=> Glow(source, GraphicsOptions.Default, radius);
@ -55,7 +56,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.Glow(GraphicsOptions.Default, rectangle);
@ -70,7 +71,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, TPixel color, float radius, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.Glow(GraphicsOptions.Default, color, ValueSize.Absolute(radius), rectangle);
@ -81,7 +82,7 @@ namespace SixLabors.ImageSharp.Processing
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="options">The options effecting things like blending.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options)
where TPixel : struct, IPixel<TPixel>
=> source.Glow(options, NamedColors<TPixel>.Black, ValueSize.PercentageOfWidth(0.5f));
@ -93,7 +94,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image this method extends.</param>
/// <param name="options">The options effecting things like blending.</param>
/// <param name="color">The color to set as the glow.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, TPixel color)
where TPixel : struct, IPixel<TPixel>
=> source.Glow(options, color, ValueSize.PercentageOfWidth(0.5f));
@ -105,7 +106,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image this method extends.</param>
/// <param name="options">The options effecting things like blending.</param>
/// <param name="radius">The the radius.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, float radius)
where TPixel : struct, IPixel<TPixel>
=> source.Glow(options, NamedColors<TPixel>.Black, ValueSize.Absolute(radius));
@ -119,7 +120,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.Glow(options, NamedColors<TPixel>.Black, ValueSize.PercentageOfWidth(0.5f), rectangle);
@ -135,7 +136,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, TPixel color, float radius, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.Glow(options, color, ValueSize.Absolute(radius), rectangle);
@ -151,7 +152,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
private static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, TPixel color, ValueSize radius, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new GlowProcessor<TPixel>(color, radius, options), rectangle);
@ -164,7 +165,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="options">The options effecting things like blending.</param>
/// <param name="color">The color to set as the glow.</param>
/// <param name="radius">The the radius.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
private static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, TPixel color, ValueSize radius)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new GlowProcessor<TPixel>(color, radius, options));

3
src/ImageSharp/Processing/GrayscaleExtensions.cs

@ -9,7 +9,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of grayscale toning to the <see cref="Image"/> type.
/// Defines extensions that allow the application of grayscale toning to an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class GrayscaleExtensions
{

6
src/ImageSharp/Processing/HistogramEqualizationExtension.cs

@ -6,7 +6,7 @@ using SixLabors.ImageSharp.Processing.Processors.Normalization;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extension that allow the adjustment of the contrast of an image via its histogram.
/// Defines extension that allow the adjustment of the contrast of an image via its histogram.
/// </summary>
public static class HistogramEqualizationExtension
{
@ -14,7 +14,7 @@ namespace SixLabors.ImageSharp.Processing
/// Equalizes the histogram of an image to increases the contrast.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext HistogramEqualization(this IImageProcessingContext source) =>
HistogramEqualization(source, HistogramEqualizationOptions.Default);
@ -23,7 +23,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="options">The histogram equalization options to use.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext HistogramEqualization(
this IImageProcessingContext source,
HistogramEqualizationOptions options) =>

7
src/ImageSharp/Processing/HueExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the alteration of the hue component to the <see cref="Image"/> type.
/// Defines extensions that allow the alteration of the hue component of an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class HueExtensions
{
@ -17,7 +18,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="degrees">The rotation angle in degrees to adjust the hue.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Hue(this IImageProcessingContext source, float degrees)
=> source.ApplyProcessor(new HueProcessor(degrees));
@ -29,7 +30,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Hue(this IImageProcessingContext source, float degrees, Rectangle rectangle)
=> source.ApplyProcessor(new HueProcessor(degrees), rectangle);
}

7
src/ImageSharp/Processing/InvertExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the inversion of colors to the <see cref="Image"/> type.
/// Defines extensions that allow the inversion of colors of an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class InvertExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// Inverts the colors of the image.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Invert(this IImageProcessingContext source)
=> source.ApplyProcessor(new InvertProcessor(1F));
@ -27,7 +28,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Invert(this IImageProcessingContext source, Rectangle rectangle)
=> source.ApplyProcessor(new InvertProcessor(1F), rectangle);
}

7
src/ImageSharp/Processing/KodachromeExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the recreation of an old Kodachrome camera effect to the <see cref="Image"/> type.
/// Defines extensions that allow the recreation of an old Kodachrome camera effect on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class KodachromeExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// Alters the colors of the image recreating an old Kodachrome camera effect.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Kodachrome(this IImageProcessingContext source)
=> source.ApplyProcessor(new KodachromeProcessor());
@ -27,7 +28,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Kodachrome(this IImageProcessingContext source, Rectangle rectangle)
=> source.ApplyProcessor(new KodachromeProcessor(), rectangle);
}

7
src/ImageSharp/Processing/LomographExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the recreation of an old Lomograph camera effect to the <see cref="Image"/> type.
/// Defines extensions that allow the recreation of an old Lomograph camera effect on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class LomographExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// Alters the colors of the image recreating an old Lomograph camera effect.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Lomograph(this IImageProcessingContext source)
=> source.ApplyProcessor(new LomographProcessor());
@ -27,7 +28,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Lomograph(this IImageProcessingContext source, Rectangle rectangle)
=> source.ApplyProcessor(new LomographProcessor(), rectangle);
}

11
src/ImageSharp/Processing/OilPaintExtensions.cs

@ -7,7 +7,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds oil painting effect extensions to the <see cref="Image"/> type.
/// Defines oil painting effect extensions applicable on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class OilPaintExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// set to <value>10</value> and <value>15</value> respectively.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext OilPaint(this IImageProcessingContext source) => OilPaint(source, 10, 15);
/// <summary>
@ -27,7 +28,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext OilPaint(this IImageProcessingContext source, Rectangle rectangle) =>
OilPaint(source, 10, 15, rectangle);
@ -37,7 +38,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image this method extends.</param>
/// <param name="levels">The number of intensity levels. Higher values result in a broader range of color intensities forming part of the result image.</param>
/// <param name="brushSize">The number of neighboring pixels used in calculating each individual pixel value.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext
OilPaint(this IImageProcessingContext source, int levels, int brushSize) =>
source.ApplyProcessor(new OilPaintingProcessor(levels, brushSize));
@ -51,7 +52,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext OilPaint(
this IImageProcessingContext source,
int levels,

7
src/ImageSharp/Processing/OpacityExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the alteration of the opacity component to the <see cref="Image{TPixel}"/> type.
/// Defines extensions that allow the alteration of the opacity component of an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class OpacityExtensions
{
@ -17,7 +18,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="amount">The proportion of the conversion. Must be between 0 and 1.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Opacity(this IImageProcessingContext source, float amount)
=> source.ApplyProcessor(new OpacityProcessor(amount));
@ -29,7 +30,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Opacity(this IImageProcessingContext source, float amount, Rectangle rectangle)
=> source.ApplyProcessor(new OpacityProcessor(amount), rectangle);
}

5
src/ImageSharp/Processing/PadExtensions.cs

@ -7,7 +7,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of padding operations to the <see cref="Image{TPixel}"/> type.
/// Defines extensions that allow the application of padding operations on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class PadExtensions
{
@ -17,7 +18,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The source image to pad.</param>
/// <param name="width">The new width.</param>
/// <param name="height">The new height.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Pad(this IImageProcessingContext source, int width, int height)
{
var options = new ResizeOptions

9
src/ImageSharp/Processing/PixelateExtensions.cs

@ -7,7 +7,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds pixelation effect extensions to the <see cref="Image"/> type.
/// Defines pixelation effect extensions applicable on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class PixelateExtensions
{
@ -15,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing
/// Pixelates an image with the given pixel size.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Pixelate(this IImageProcessingContext source) => Pixelate(source, 4);
/// <summary>
@ -23,7 +24,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="size">The size of the pixels.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Pixelate(this IImageProcessingContext source, int size) =>
source.ApplyProcessor(new PixelateProcessor(size));
@ -35,7 +36,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Pixelate(
this IImageProcessingContext source,
int size,

7
src/ImageSharp/Processing/PolaroidExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the recreation of an old Polaroid camera effect to the <see cref="Image"/> type.
/// Defines extensions that allow the recreation of an old Polaroid camera effect on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class PolaroidExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// Alters the colors of the image recreating an old Polaroid camera effect.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Polaroid(this IImageProcessingContext source)
=> source.ApplyProcessor(new PolaroidProcessor());
@ -27,7 +28,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Polaroid(this IImageProcessingContext source, Rectangle rectangle)
=> source.ApplyProcessor(new PolaroidProcessor(), rectangle);
}

7
src/ImageSharp/Processing/QuantizeExtensions.cs

@ -7,7 +7,8 @@ using SixLabors.ImageSharp.Processing.Processors.Quantization;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of quantizing algorithms to the <see cref="Image{TPixel}"/> type.
/// Defines extensions that allow the application of quantizing algorithms on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class QuantizeExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Quantize<TPixel>(this IImageProcessingContext<TPixel> source)
where TPixel : struct, IPixel<TPixel>
=> Quantize(source, KnownQuantizers.Octree);
@ -27,7 +28,7 @@ namespace SixLabors.ImageSharp.Processing
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="quantizer">The quantizer to apply to perform the operation.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Quantize<TPixel>(this IImageProcessingContext<TPixel> source, IQuantizer quantizer)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new QuantizeProcessor<TPixel>(quantizer));

23
src/ImageSharp/Processing/ResizeExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of resize operations to the <see cref="Image{TPixel}"/> type.
/// Defines extensions that allow the application of resize operations on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class ResizeExtensions
{
@ -17,7 +18,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image to resize.</param>
/// <param name="options">The resize options.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
/// <remarks>Passing zero for one of height or width within the resize options will automatically preserve the aspect ratio of the original image or the nearest possible ratio.</remarks>
public static IImageProcessingContext Resize(this IImageProcessingContext source, ResizeOptions options)
=> source.ApplyProcessor(new ResizeProcessor(options, source.GetCurrentSize()));
@ -27,7 +28,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image to resize.</param>
/// <param name="size">The target image size.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio.</remarks>
public static IImageProcessingContext Resize(this IImageProcessingContext source, Size size)
=> Resize(source, size.Width, size.Height, KnownResamplers.Bicubic, false);
@ -38,7 +39,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image to resize.</param>
/// <param name="size">The target image size.</param>
/// <param name="compand">Whether to compress and expand the image color-space to gamma correct the image during processing.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio.</remarks>
public static IImageProcessingContext Resize(this IImageProcessingContext source, Size size, bool compand)
=> Resize(source, size.Width, size.Height, KnownResamplers.Bicubic, compand);
@ -49,7 +50,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image to resize.</param>
/// <param name="width">The target image width.</param>
/// <param name="height">The target image height.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio.</remarks>
public static IImageProcessingContext Resize(this IImageProcessingContext source, int width, int height)
=> Resize(source, width, height, KnownResamplers.Bicubic, false);
@ -61,7 +62,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="width">The target image width.</param>
/// <param name="height">The target image height.</param>
/// <param name="compand">Whether to compress and expand the image color-space to gamma correct the image during processing.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio.</remarks>
public static IImageProcessingContext Resize(this IImageProcessingContext source, int width, int height, bool compand)
=> Resize(source, width, height, KnownResamplers.Bicubic, compand);
@ -73,7 +74,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="width">The target image width.</param>
/// <param name="height">The target image height.</param>
/// <param name="sampler">The <see cref="IResampler"/> to perform the resampling.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio.</remarks>
public static IImageProcessingContext Resize(this IImageProcessingContext source, int width, int height, IResampler sampler)
=> Resize(source, width, height, sampler, false);
@ -85,7 +86,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="size">The target image size.</param>
/// <param name="sampler">The <see cref="IResampler"/> to perform the resampling.</param>
/// <param name="compand">Whether to compress and expand the image color-space to gamma correct the image during processing.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio.</remarks>
public static IImageProcessingContext Resize(this IImageProcessingContext source, Size size, IResampler sampler, bool compand)
=> Resize(source, size.Width, size.Height, sampler, new Rectangle(0, 0, size.Width, size.Height), compand);
@ -98,7 +99,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="height">The target image height.</param>
/// <param name="sampler">The <see cref="IResampler"/> to perform the resampling.</param>
/// <param name="compand">Whether to compress and expand the image color-space to gamma correct the image during processing.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio.</remarks>
public static IImageProcessingContext Resize(this IImageProcessingContext source, int width, int height, IResampler sampler, bool compand)
=> Resize(source, width, height, sampler, new Rectangle(0, 0, width, height), compand);
@ -118,7 +119,7 @@ namespace SixLabors.ImageSharp.Processing
/// The <see cref="Rectangle"/> structure that specifies the portion of the target image object to draw to.
/// </param>
/// <param name="compand">Whether to compress and expand the image color-space to gamma correct the image during processing.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio.</remarks>
public static IImageProcessingContext Resize(
this IImageProcessingContext source,
@ -141,7 +142,7 @@ namespace SixLabors.ImageSharp.Processing
/// The <see cref="Rectangle"/> structure that specifies the portion of the target image object to draw to.
/// </param>
/// <param name="compand">Whether to compress and expand the image color-space to gamma correct the image during processing.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
/// <remarks>Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio.</remarks>
public static IImageProcessingContext Resize(
this IImageProcessingContext source,

9
src/ImageSharp/Processing/RotateExtensions.cs

@ -6,7 +6,8 @@ using SixLabors.ImageSharp.Processing.Processors.Transforms;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of rotate operations to the <see cref="Image"/> type.
/// Defines extensions that allow the application of rotate operations on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class RotateExtensions
{
@ -15,7 +16,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image to rotate.</param>
/// <param name="rotateMode">The <see cref="RotateMode"/> to perform the rotation.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Rotate(this IImageProcessingContext source, RotateMode rotateMode) =>
Rotate(source, (float)rotateMode);
@ -24,7 +25,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image to rotate.</param>
/// <param name="degrees">The angle in degrees to perform the rotation.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Rotate(this IImageProcessingContext source, float degrees) =>
Rotate(source, degrees, KnownResamplers.Bicubic);
@ -34,7 +35,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image to rotate.</param>
/// <param name="degrees">The angle in degrees to perform the rotation.</param>
/// <param name="sampler">The <see cref="IResampler"/> to perform the resampling.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Rotate(
this IImageProcessingContext source,
float degrees,

5
src/ImageSharp/Processing/RotateFlipExtensions.cs

@ -6,7 +6,8 @@ using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of rotate-flip operations to the <see cref="Image"/> type.
/// Defines extensions that allow the application of rotate-flip operations on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class RotateFlipExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image to rotate, flip, or both.</param>
/// <param name="rotateMode">The <see cref="RotateMode"/> to perform the rotation.</param>
/// <param name="flipMode">The <see cref="FlipMode"/> to perform the flip.</param>
/// <returns>The <see cref="Image{TPixel}"/></returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext RotateFlip(this IImageProcessingContext source, RotateMode rotateMode, FlipMode flipMode)
=> source.Rotate(rotateMode).Flip(flipMode);
}

7
src/ImageSharp/Processing/SaturateExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the alteration of the saturation component to the <see cref="Image"/> type.
/// Defines extensions that allow the alteration of the saturation component of an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class SaturateExtensions
{
@ -21,7 +22,7 @@ namespace SixLabors.ImageSharp.Processing
/// </remarks>
/// <param name="source">The image this method extends.</param>
/// <param name="amount">The proportion of the conversion. Must be greater than or equal to 0.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Saturate(this IImageProcessingContext source, float amount)
=> source.ApplyProcessor(new SaturateProcessor(amount));
@ -37,7 +38,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Saturate(this IImageProcessingContext source, float amount, Rectangle rectangle)
=> source.ApplyProcessor(new SaturateProcessor(amount), rectangle);
}

11
src/ImageSharp/Processing/SepiaExtensions.cs

@ -8,7 +8,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of sepia toning to the <see cref="Image"/> type.
/// Defines extensions that allow the application of sepia toning on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class SepiaExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// Applies sepia toning to the image.
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Sepia(this IImageProcessingContext source)
=> Sepia(source, 1F);
@ -25,7 +26,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image this method extends.</param>
/// <param name="amount">The proportion of the conversion. Must be between 0 and 1.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Sepia(this IImageProcessingContext source, float amount)
=> source.ApplyProcessor(new SepiaProcessor(amount));
@ -36,7 +37,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Sepia(this IImageProcessingContext source, Rectangle rectangle)
=> Sepia(source, 1F, rectangle);
@ -48,7 +49,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Sepia(this IImageProcessingContext source, float amount, Rectangle rectangle)
=> source.ApplyProcessor(new SepiaProcessor(amount), rectangle);
}

7
src/ImageSharp/Processing/SkewExtensions.cs

@ -6,7 +6,8 @@ using SixLabors.ImageSharp.Processing.Processors.Transforms;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of skew operations to the <see cref="Image"/> type.
/// Defines extensions that allow the application of skew operations on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class SkewExtensions
{
@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image to skew.</param>
/// <param name="degreesX">The angle in degrees to perform the skew along the x-axis.</param>
/// <param name="degreesY">The angle in degrees to perform the skew along the y-axis.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext
Skew(this IImageProcessingContext source, float degreesX, float degreesY) =>
Skew(source, degreesX, degreesY, KnownResamplers.Bicubic);
@ -28,7 +29,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="degreesX">The angle in degrees to perform the skew along the x-axis.</param>
/// <param name="degreesY">The angle in degrees to perform the skew along the y-axis.</param>
/// <param name="sampler">The <see cref="IResampler"/> to perform the resampling.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Skew(
this IImageProcessingContext source,
float degreesX,

17
src/ImageSharp/Processing/TransformExtensions.cs

@ -9,7 +9,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of composable transform operations to the <see cref="Image"/> type.
/// Defines extensions that allow the application of composable transform operations on an <see cref="Image"/>
/// using Mutate/Clone.
/// </summary>
public static class TransformExtensions
{
@ -30,7 +31,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="ctx">The <see cref="IImageProcessingContext"/>.</param>
/// <param name="builder">The affine transform builder.</param>
/// <param name="sampler">The <see cref="IResampler"/> to perform the resampling.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Transform(
this IImageProcessingContext ctx,
AffineTransformBuilder builder,
@ -44,7 +45,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="sourceRectangle">The source rectangle</param>
/// <param name="builder">The affine transform builder.</param>
/// <param name="sampler">The <see cref="IResampler"/> to perform the resampling.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Transform(
this IImageProcessingContext ctx,
Rectangle sourceRectangle,
@ -64,7 +65,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="transform">The transformation matrix.</param>
/// <param name="targetDimensions">The size of the result image.</param>
/// <param name="sampler">The <see cref="IResampler"/> to perform the resampling.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Transform(
this IImageProcessingContext ctx,
Rectangle sourceRectangle,
@ -82,7 +83,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <param name="source">The image to transform.</param>
/// <param name="builder">The affine transform builder.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Transform(
this IImageProcessingContext source,
ProjectiveTransformBuilder builder) =>
@ -94,7 +95,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="ctx">The <see cref="IImageProcessingContext"/>.</param>
/// <param name="builder">The projective transform builder.</param>
/// <param name="sampler">The <see cref="IResampler"/> to perform the resampling.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Transform(
this IImageProcessingContext ctx,
ProjectiveTransformBuilder builder,
@ -108,7 +109,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="sourceRectangle">The source rectangle</param>
/// <param name="builder">The projective transform builder.</param>
/// <param name="sampler">The <see cref="IResampler"/> to perform the resampling.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Transform(
this IImageProcessingContext ctx,
Rectangle sourceRectangle,
@ -128,7 +129,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="transform">The transformation matrix.</param>
/// <param name="targetDimensions">The size of the result image.</param>
/// <param name="sampler">The <see cref="IResampler"/> to perform the resampling.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext Transform(
this IImageProcessingContext ctx,
Rectangle sourceRectangle,

23
src/ImageSharp/Processing/VignetteExtensions.cs

@ -9,7 +9,8 @@ using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Processing
{
/// <summary>
/// Adds extensions that allow the application of a radial glow to the <see cref="Image{TPixel}"/> type.
/// Defines extensions that allow the application of a radial glow to an <see cref="Image{TPixel}"/>
/// using Mutate/Clone.
/// </summary>
public static class VignetteExtensions
{
@ -18,7 +19,7 @@ namespace SixLabors.ImageSharp.Processing
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Vignette<TPixel>(this IImageProcessingContext<TPixel> source)
where TPixel : struct, IPixel<TPixel>
=> Vignette(source, GraphicsOptions.Default);
@ -29,7 +30,7 @@ namespace SixLabors.ImageSharp.Processing
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="color">The color to set as the vignette.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Vignette<TPixel>(this IImageProcessingContext<TPixel> source, TPixel color)
where TPixel : struct, IPixel<TPixel>
=> Vignette(source, GraphicsOptions.Default, color);
@ -41,7 +42,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image this method extends.</param>
/// <param name="radiusX">The the x-radius.</param>
/// <param name="radiusY">The the y-radius.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Vignette<TPixel>(this IImageProcessingContext<TPixel> source, float radiusX, float radiusY)
where TPixel : struct, IPixel<TPixel>
=> Vignette(source, GraphicsOptions.Default, radiusX, radiusY);
@ -54,7 +55,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Vignette<TPixel>(this IImageProcessingContext<TPixel> source, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> Vignette(source, GraphicsOptions.Default, rectangle);
@ -70,7 +71,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Vignette<TPixel>(this IImageProcessingContext<TPixel> source, TPixel color, float radiusX, float radiusY, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.Vignette(GraphicsOptions.Default, color, radiusX, radiusY, rectangle);
@ -81,7 +82,7 @@ namespace SixLabors.ImageSharp.Processing
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="options">The options effecting pixel blending.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Vignette<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options)
where TPixel : struct, IPixel<TPixel>
=> source.VignetteInternal(options, NamedColors<TPixel>.Black, ValueSize.PercentageOfWidth(.5f), ValueSize.PercentageOfHeight(.5f));
@ -93,7 +94,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="source">The image this method extends.</param>
/// <param name="options">The options effecting pixel blending.</param>
/// <param name="color">The color to set as the vignette.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Vignette<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, TPixel color)
where TPixel : struct, IPixel<TPixel>
=> source.VignetteInternal(options, color, ValueSize.PercentageOfWidth(.5f), ValueSize.PercentageOfHeight(.5f));
@ -106,7 +107,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="options">The options effecting pixel blending.</param>
/// <param name="radiusX">The the x-radius.</param>
/// <param name="radiusY">The the y-radius.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Vignette<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, float radiusX, float radiusY)
where TPixel : struct, IPixel<TPixel>
=> source.VignetteInternal(options, NamedColors<TPixel>.Black, radiusX, radiusY);
@ -120,7 +121,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Vignette<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.VignetteInternal(options, NamedColors<TPixel>.Black, ValueSize.PercentageOfWidth(.5f), ValueSize.PercentageOfHeight(.5f), rectangle);
@ -137,7 +138,7 @@ namespace SixLabors.ImageSharp.Processing
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
/// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
public static IImageProcessingContext<TPixel> Vignette<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, TPixel color, float radiusX, float radiusY, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>
=> source.VignetteInternal(options, color, radiusX, radiusY, rectangle);

Loading…
Cancel
Save