From e9a693b99aafb03a39e89f860a3ed55e64c18c2b Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Thu, 26 Jan 2023 18:08:53 +1000 Subject: [PATCH] Normalize parameters across all extension methods --- .../Processing/AdaptiveThresholdExtensions.cs | 24 +++---- .../Binarization/BinaryDitherExtensions.cs | 16 ++--- .../Binarization/BinaryThresholdExtensions.cs | 32 +++++----- .../Convolution/BokehBlurExtensions.cs | 16 ++--- .../Convolution/BoxBlurExtensions.cs | 18 +++--- .../Convolution/DetectEdgesExtensions.cs | 56 ++++++++--------- .../Convolution/GaussianBlurExtensions.cs | 18 +++--- .../Convolution/GaussianSharpenExtensions.cs | 18 +++--- .../Convolution/MedianBlurExtensions.cs | 10 +-- .../Extensions/Dithering/DitherExtensions.cs | 40 ++++++------ .../Extensions/Effects/OilPaintExtensions.cs | 18 +++--- .../Effects/PixelRowDelegateExtensions.cs | 32 +++++----- .../Extensions/Effects/PixelateExtensions.cs | 12 ++-- .../Filters/BlackWhiteExtensions.cs | 10 +-- .../Filters/BrightnessExtensions.cs | 10 +-- .../Filters/ColorBlindnessExtensions.cs | 10 +-- .../Extensions/Filters/ContrastExtensions.cs | 10 +-- .../Extensions/Filters/FilterExtensions.cs | 10 +-- .../Extensions/Filters/GrayscaleExtensions.cs | 16 ++--- .../Extensions/Filters/HueExtensions.cs | 10 +-- .../Extensions/Filters/InvertExtensions.cs | 10 +-- .../Filters/KodachromeExtensions.cs | 10 +-- .../Extensions/Filters/LightnessExtensions.cs | 8 +-- .../Extensions/Filters/LomographExtensions.cs | 8 +-- .../Extensions/Filters/OpacityExtensions.cs | 10 +-- .../Extensions/Filters/PolaroidExtensions.cs | 8 +-- .../Extensions/Filters/SaturateExtensions.cs | 10 +-- .../Extensions/Filters/SepiaExtensions.cs | 18 +++--- .../HistogramEqualizationExtensions.cs | 10 +-- .../Overlays/BackgroundColorExtensions.cs | 16 ++--- .../Extensions/Overlays/GlowExtensions.cs | 48 +++++++------- .../Extensions/Overlays/VignetteExtensions.cs | 40 ++++++------ .../Quantization/QuantizeExtensions.cs | 16 ++--- .../Transforms/AutoOrientExtensions.cs | 6 +- .../Extensions/Transforms/CropExtensions.cs | 10 +-- .../Transforms/EntropyCropExtensions.cs | 8 +-- .../Extensions/Transforms/FlipExtensions.cs | 6 +- .../Extensions/Transforms/PadExtensions.cs | 8 +-- .../Extensions/Transforms/ResizeExtensions.cs | 40 ++++++------ .../Extensions/Transforms/RotateExtensions.cs | 14 ++--- .../Transforms/RotateFlipExtensions.cs | 6 +- .../Extensions/Transforms/SkewExtensions.cs | 10 +-- .../Transforms/SwizzleExtensions.cs | 4 +- .../Transforms/TransformExtensions.cs | 62 +++++++++---------- 44 files changed, 384 insertions(+), 388 deletions(-) diff --git a/src/ImageSharp/Processing/AdaptiveThresholdExtensions.cs b/src/ImageSharp/Processing/AdaptiveThresholdExtensions.cs index fce2f574db..d008d1f67e 100644 --- a/src/ImageSharp/Processing/AdaptiveThresholdExtensions.cs +++ b/src/ImageSharp/Processing/AdaptiveThresholdExtensions.cs @@ -13,61 +13,61 @@ public static class AdaptiveThresholdExtensions /// /// Applies Bradley Adaptive Threshold to the image. /// - /// The image this method extends. - /// The . + /// The current image processing context. + /// The . public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source) => source.ApplyProcessor(new AdaptiveThresholdProcessor()); /// /// Applies Bradley Adaptive Threshold to the image. /// - /// The image this method extends. + /// The current image processing context. /// Threshold limit (0.0-1.0) to consider for binarization. - /// The . + /// The . public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source, float thresholdLimit) => source.ApplyProcessor(new AdaptiveThresholdProcessor(thresholdLimit)); /// /// Applies Bradley Adaptive Threshold to the image. /// - /// The image this method extends. + /// The current image processing context. /// Upper (white) color for thresholding. /// Lower (black) color for thresholding. - /// The . + /// The . public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source, Color upper, Color lower) => source.ApplyProcessor(new AdaptiveThresholdProcessor(upper, lower)); /// /// Applies Bradley Adaptive Threshold to the image. /// - /// The image this method extends. + /// The current image processing context. /// Upper (white) color for thresholding. /// Lower (black) color for thresholding. /// Threshold limit (0.0-1.0) to consider for binarization. - /// The . + /// The . public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source, Color upper, Color lower, float thresholdLimit) => source.ApplyProcessor(new AdaptiveThresholdProcessor(upper, lower, thresholdLimit)); /// /// Applies Bradley Adaptive Threshold to the image. /// - /// The image this method extends. + /// The current image processing context. /// Upper (white) color for thresholding. /// Lower (black) color for thresholding. /// Rectangle region to apply the processor on. - /// The . + /// The . public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source, Color upper, Color lower, Rectangle rectangle) => source.ApplyProcessor(new AdaptiveThresholdProcessor(upper, lower), rectangle); /// /// Applies Bradley Adaptive Threshold to the image. /// - /// The image this method extends. + /// The current image processing context. /// Upper (white) color for thresholding. /// Lower (black) color for thresholding. /// Threshold limit (0.0-1.0) to consider for binarization. /// Rectangle region to apply the processor on. - /// The . + /// The . public static IImageProcessingContext AdaptiveThreshold(this IImageProcessingContext source, Color upper, Color lower, float thresholdLimit, Rectangle rectangle) => source.ApplyProcessor(new AdaptiveThresholdProcessor(upper, lower, thresholdLimit), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Binarization/BinaryDitherExtensions.cs b/src/ImageSharp/Processing/Extensions/Binarization/BinaryDitherExtensions.cs index 887455b821..e490cdf85f 100644 --- a/src/ImageSharp/Processing/Extensions/Binarization/BinaryDitherExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Binarization/BinaryDitherExtensions.cs @@ -14,9 +14,9 @@ public static class BinaryDitherExtensions /// /// Dithers the image reducing it to two colors using ordered dithering. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryDither(this IImageProcessingContext source, IDither dither) => BinaryDither(source, dither, Color.White, Color.Black); @@ -24,11 +24,11 @@ public static class BinaryDitherExtensions /// /// Dithers the image reducing it to two colors using ordered dithering. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. /// The color to use for pixels that are above the threshold. /// The color to use for pixels that are below the threshold - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryDither( this IImageProcessingContext source, IDither dither, @@ -39,12 +39,12 @@ public static class BinaryDitherExtensions /// /// Dithers the image reducing it to two colors using ordered dithering. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryDither( this IImageProcessingContext source, IDither dither, @@ -54,14 +54,14 @@ public static class BinaryDitherExtensions /// /// Dithers the image reducing it to two colors using ordered dithering. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. /// The color to use for pixels that are above the threshold. /// The color to use for pixels that are below the threshold /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryDither( this IImageProcessingContext source, IDither dither, diff --git a/src/ImageSharp/Processing/Extensions/Binarization/BinaryThresholdExtensions.cs b/src/ImageSharp/Processing/Extensions/Binarization/BinaryThresholdExtensions.cs index 802ad06d75..815b059cf5 100644 --- a/src/ImageSharp/Processing/Extensions/Binarization/BinaryThresholdExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Binarization/BinaryThresholdExtensions.cs @@ -15,19 +15,19 @@ public static class BinaryThresholdExtensions /// Applies binarization to the image splitting the pixels at the given threshold with /// Luminance as the color component to be compared to threshold. /// - /// The image this method extends. + /// The current image processing context. /// The threshold to apply binarization of the image. Must be between 0 and 1. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryThreshold(this IImageProcessingContext source, float threshold) => source.ApplyProcessor(new BinaryThresholdProcessor(threshold, BinaryThresholdMode.Luminance)); /// /// Applies binarization to the image splitting the pixels at the given threshold. /// - /// The image this method extends. + /// The current image processing context. /// The threshold to apply binarization of the image. Must be between 0 and 1. /// Selects the value to be compared to threshold. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryThreshold( this IImageProcessingContext source, float threshold, @@ -38,12 +38,12 @@ public static class BinaryThresholdExtensions /// Applies binarization to the image splitting the pixels at the given threshold with /// Luminance as the color component to be compared to threshold. /// - /// The image this method extends. + /// The current image processing context. /// The threshold to apply binarization of the image. Must be between 0 and 1. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryThreshold( this IImageProcessingContext source, float threshold, @@ -53,13 +53,13 @@ public static class BinaryThresholdExtensions /// /// Applies binarization to the image splitting the pixels at the given threshold. /// - /// The image this method extends. + /// The current image processing context. /// The threshold to apply binarization of the image. Must be between 0 and 1. /// Selects the value to be compared to threshold. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryThreshold( this IImageProcessingContext source, float threshold, @@ -71,11 +71,11 @@ public static class BinaryThresholdExtensions /// Applies binarization to the image splitting the pixels at the given threshold with /// Luminance as the color component to be compared to threshold. /// - /// The image this method extends. + /// The current image processing context. /// The threshold to apply binarization of the image. Must be between 0 and 1. /// The color to use for pixels that are above the threshold. /// The color to use for pixels that are below the threshold - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryThreshold( this IImageProcessingContext source, float threshold, @@ -86,12 +86,12 @@ public static class BinaryThresholdExtensions /// /// Applies binarization to the image splitting the pixels at the given threshold. /// - /// The image this method extends. + /// The current image processing context. /// The threshold to apply binarization of the image. Must be between 0 and 1. /// The color to use for pixels that are above the threshold. /// The color to use for pixels that are below the threshold /// Selects the value to be compared to threshold. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryThreshold( this IImageProcessingContext source, float threshold, @@ -104,14 +104,14 @@ public static class BinaryThresholdExtensions /// Applies binarization to the image splitting the pixels at the given threshold with /// Luminance as the color component to be compared to threshold. /// - /// The image this method extends. + /// The current image processing context. /// The threshold to apply binarization of the image. Must be between 0 and 1. /// The color to use for pixels that are above the threshold. /// The color to use for pixels that are below the threshold /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryThreshold( this IImageProcessingContext source, float threshold, @@ -123,7 +123,7 @@ public static class BinaryThresholdExtensions /// /// Applies binarization to the image splitting the pixels at the given threshold. /// - /// The image this method extends. + /// The current image processing context. /// The threshold to apply binarization of the image. Must be between 0 and 1. /// The color to use for pixels that are above the threshold. /// The color to use for pixels that are below the threshold @@ -131,7 +131,7 @@ public static class BinaryThresholdExtensions /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BinaryThreshold( this IImageProcessingContext source, float threshold, diff --git a/src/ImageSharp/Processing/Extensions/Convolution/BokehBlurExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/BokehBlurExtensions.cs index 1688e5cc76..e3e6f13ed6 100644 --- a/src/ImageSharp/Processing/Extensions/Convolution/BokehBlurExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Convolution/BokehBlurExtensions.cs @@ -13,44 +13,44 @@ public static class BokehBlurExtensions /// /// Applies a bokeh blur to the image. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext BokehBlur(this IImageProcessingContext source) => source.ApplyProcessor(new BokehBlurProcessor()); /// /// Applies a bokeh blur to the image. /// - /// The image this method extends. + /// The current image processing context. /// The 'radius' value representing the size of the area to sample. /// The 'components' value representing the number of kernels to use to approximate the bokeh effect. /// The gamma highlight factor to use to emphasize bright spots in the source image - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BokehBlur(this IImageProcessingContext source, int radius, int components, float gamma) => source.ApplyProcessor(new BokehBlurProcessor(radius, components, gamma)); /// /// Applies a bokeh blur to the image. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BokehBlur(this IImageProcessingContext source, Rectangle rectangle) => source.ApplyProcessor(new BokehBlurProcessor(), rectangle); /// /// Applies a bokeh blur to the image. /// - /// The image this method extends. + /// The current image processing context. /// The 'radius' value representing the size of the area to sample. /// The 'components' value representing the number of kernels to use to approximate the bokeh effect. /// The gamma highlight factor to use to emphasize bright spots in the source image /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BokehBlur(this IImageProcessingContext source, int radius, int components, float gamma, Rectangle rectangle) => source.ApplyProcessor(new BokehBlurProcessor(radius, components, gamma), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Convolution/BoxBlurExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/BoxBlurExtensions.cs index 85b4888f0d..6611af742b 100644 --- a/src/ImageSharp/Processing/Extensions/Convolution/BoxBlurExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Convolution/BoxBlurExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Convolution; @@ -14,36 +14,36 @@ public static class BoxBlurExtensions /// /// Applies a box blur to the image. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext BoxBlur(this IImageProcessingContext source) => source.ApplyProcessor(new BoxBlurProcessor()); /// /// Applies a box blur to the image. /// - /// The image this method extends. + /// The current image processing context. /// The 'radius' value representing the size of the area to sample. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BoxBlur(this IImageProcessingContext source, int radius) => source.ApplyProcessor(new BoxBlurProcessor(radius)); /// /// Applies a box blur to the image. /// - /// The image this method extends. + /// The current image processing context. /// The 'radius' value representing the size of the area to sample. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BoxBlur(this IImageProcessingContext source, int radius, Rectangle rectangle) => source.ApplyProcessor(new BoxBlurProcessor(radius), rectangle); /// /// Applies a box blur to the image. /// - /// The image this method extends. + /// The current image processing context. /// The 'radius' value representing the size of the area to sample. /// /// The structure that specifies the portion of the image object to alter. @@ -54,7 +54,7 @@ public static class BoxBlurExtensions /// /// The to use when mapping the pixels outside of the border, in Y direction. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BoxBlur(this IImageProcessingContext source, int radius, Rectangle rectangle, BorderWrappingMode borderWrapModeX, BorderWrappingMode borderWrapModeY) { var processor = new BoxBlurProcessor(radius, borderWrapModeX, borderWrapModeY); diff --git a/src/ImageSharp/Processing/Extensions/Convolution/DetectEdgesExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/DetectEdgesExtensions.cs index 7f57ae9837..b044c3966f 100644 --- a/src/ImageSharp/Processing/Extensions/Convolution/DetectEdgesExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Convolution/DetectEdgesExtensions.cs @@ -14,8 +14,8 @@ public static class DetectEdgesExtensions /// Detects any edges within the image. /// Uses the kernel operating in grayscale mode. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext DetectEdges(this IImageProcessingContext source) => DetectEdges(source, KnownEdgeDetectorKernels.Sobel); @@ -23,11 +23,11 @@ public static class DetectEdgesExtensions /// Detects any edges within the image. /// Uses the kernel operating in grayscale mode. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, Rectangle rectangle) => @@ -36,9 +36,9 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image operating in grayscale mode. /// - /// The image this method extends. + /// The current image processing context. /// The 2D edge detector kernel. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetector2DKernel kernel) => @@ -47,12 +47,12 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image using a . /// - /// The image this method extends. + /// The current image processing context. /// The 2D edge detector kernel. /// /// Whether to convert the image to grayscale before performing edge detection. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetector2DKernel kernel, @@ -66,12 +66,12 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image operating in grayscale mode. /// - /// The image this method extends. + /// The current image processing context. /// The 2D edge detector kernel. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetector2DKernel kernel, @@ -81,7 +81,7 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image using a . /// - /// The image this method extends. + /// The current image processing context. /// The 2D edge detector kernel. /// /// Whether to convert the image to grayscale before performing edge detection. @@ -89,7 +89,7 @@ public static class DetectEdgesExtensions /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetector2DKernel kernel, @@ -104,9 +104,9 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image operating in grayscale mode. /// - /// The image this method extends. + /// The current image processing context. /// The edge detector kernel. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetectorKernel kernel) => @@ -115,12 +115,12 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image using a . /// - /// The image this method extends. + /// The current image processing context. /// The edge detector kernel. /// /// Whether to convert the image to grayscale before performing edge detection. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetectorKernel kernel, @@ -134,12 +134,12 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image operating in grayscale mode. /// - /// The image this method extends. + /// The current image processing context. /// The edge detector kernel. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetectorKernel kernel, @@ -149,7 +149,7 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image using a . /// - /// The image this method extends. + /// The current image processing context. /// The edge detector kernel. /// /// Whether to convert the image to grayscale before performing edge detection. @@ -157,7 +157,7 @@ public static class DetectEdgesExtensions /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetectorKernel kernel, @@ -172,9 +172,9 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image operating in grayscale mode. /// - /// The image this method extends. + /// The current image processing context. /// Thecompass edge detector kernel. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetectorCompassKernel kernel) => @@ -183,12 +183,12 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image using a . /// - /// The image this method extends. + /// The current image processing context. /// Thecompass edge detector kernel. /// /// Whether to convert the image to grayscale before performing edge detection. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetectorCompassKernel kernel, @@ -202,12 +202,12 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image operating in grayscale mode. /// - /// The image this method extends. + /// The current image processing context. /// Thecompass edge detector kernel. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetectorCompassKernel kernel, @@ -217,7 +217,7 @@ public static class DetectEdgesExtensions /// /// Detects any edges within the image using a . /// - /// The image this method extends. + /// The current image processing context. /// Thecompass edge detector kernel. /// /// Whether to convert the image to grayscale before performing edge detection. @@ -225,7 +225,7 @@ public static class DetectEdgesExtensions /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext DetectEdges( this IImageProcessingContext source, EdgeDetectorCompassKernel kernel, diff --git a/src/ImageSharp/Processing/Extensions/Convolution/GaussianBlurExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/GaussianBlurExtensions.cs index 9ea4e24af4..b851482008 100644 --- a/src/ImageSharp/Processing/Extensions/Convolution/GaussianBlurExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Convolution/GaussianBlurExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Convolution; @@ -14,36 +14,36 @@ public static class GaussianBlurExtensions /// /// Applies a Gaussian blur to the image. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext GaussianBlur(this IImageProcessingContext source) => source.ApplyProcessor(new GaussianBlurProcessor()); /// /// Applies a Gaussian blur to the image. /// - /// The image this method extends. + /// The current image processing context. /// The 'sigma' value representing the weight of the blur. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext GaussianBlur(this IImageProcessingContext source, float sigma) => source.ApplyProcessor(new GaussianBlurProcessor(sigma)); /// /// Applies a Gaussian blur to the image. /// - /// The image this method extends. + /// The current image processing context. /// The 'sigma' value representing the weight of the blur. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext GaussianBlur(this IImageProcessingContext source, float sigma, Rectangle rectangle) => source.ApplyProcessor(new GaussianBlurProcessor(sigma), rectangle); /// /// Applies a Gaussian blur to the image. /// - /// The image this method extends. + /// The current image processing context. /// The 'sigma' value representing the weight of the blur. /// /// The structure that specifies the portion of the image object to alter. @@ -54,7 +54,7 @@ public static class GaussianBlurExtensions /// /// The to use when mapping the pixels outside of the border, in Y direction. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext GaussianBlur(this IImageProcessingContext source, float sigma, Rectangle rectangle, BorderWrappingMode borderWrapModeX, BorderWrappingMode borderWrapModeY) { var processor = new GaussianBlurProcessor(sigma, borderWrapModeX, borderWrapModeY); diff --git a/src/ImageSharp/Processing/Extensions/Convolution/GaussianSharpenExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/GaussianSharpenExtensions.cs index 70b8e6f439..4a94df0963 100644 --- a/src/ImageSharp/Processing/Extensions/Convolution/GaussianSharpenExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Convolution/GaussianSharpenExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Convolution; @@ -14,29 +14,29 @@ public static class GaussianSharpenExtensions /// /// Applies a Gaussian sharpening filter to the image. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext GaussianSharpen(this IImageProcessingContext source) => source.ApplyProcessor(new GaussianSharpenProcessor()); /// /// Applies a Gaussian sharpening filter to the image. /// - /// The image this method extends. + /// The current image processing context. /// The 'sigma' value representing the weight of the blur. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext GaussianSharpen(this IImageProcessingContext source, float sigma) => source.ApplyProcessor(new GaussianSharpenProcessor(sigma)); /// /// Applies a Gaussian sharpening filter to the image. /// - /// The image this method extends. + /// The current image processing context. /// The 'sigma' value representing the weight of the blur. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext GaussianSharpen( this IImageProcessingContext source, float sigma, @@ -46,7 +46,7 @@ public static class GaussianSharpenExtensions /// /// Applies a Gaussian sharpening filter to the image. /// - /// The image this method extends. + /// The current image processing context. /// The 'sigma' value representing the weight of the blur. /// /// The structure that specifies the portion of the image object to alter. @@ -57,7 +57,7 @@ public static class GaussianSharpenExtensions /// /// The to use when mapping the pixels outside of the border, in Y direction. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext GaussianSharpen(this IImageProcessingContext source, float sigma, Rectangle rectangle, BorderWrappingMode borderWrapModeX, BorderWrappingMode borderWrapModeY) { var processor = new GaussianSharpenProcessor(sigma, borderWrapModeX, borderWrapModeY); diff --git a/src/ImageSharp/Processing/Extensions/Convolution/MedianBlurExtensions.cs b/src/ImageSharp/Processing/Extensions/Convolution/MedianBlurExtensions.cs index 60a80d35e5..a08a398b75 100644 --- a/src/ImageSharp/Processing/Extensions/Convolution/MedianBlurExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Convolution/MedianBlurExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Convolution; @@ -14,19 +14,19 @@ public static class MedianBlurExtensions /// /// Applies a median blur on the image. /// - /// The image this method extends. + /// The current image processing context. /// The radius of the area to find the median for. /// /// Whether the filter is applied to alpha as well as the color channels. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext MedianBlur(this IImageProcessingContext source, int radius, bool preserveAlpha) => source.ApplyProcessor(new MedianBlurProcessor(radius, preserveAlpha)); /// /// Applies a median blur on the image. /// - /// The image this method extends. + /// The current image processing context. /// The radius of the area to find the median for. /// /// Whether the filter is applied to alpha as well as the color channels. @@ -34,7 +34,7 @@ public static class MedianBlurExtensions /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext MedianBlur(this IImageProcessingContext source, int radius, bool preserveAlpha, Rectangle rectangle) => source.ApplyProcessor(new MedianBlurProcessor(radius, preserveAlpha), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Dithering/DitherExtensions.cs b/src/ImageSharp/Processing/Extensions/Dithering/DitherExtensions.cs index 3eaeb715d3..fbeddb479d 100644 --- a/src/ImageSharp/Processing/Extensions/Dithering/DitherExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Dithering/DitherExtensions.cs @@ -14,17 +14,17 @@ public static class DitherExtensions /// /// Dithers the image reducing it to a web-safe palette using . /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext Dither(this IImageProcessingContext source) => Dither(source, KnownDitherings.Bayer8x8); /// /// Dithers the image reducing it to a web-safe palette. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Dither( this IImageProcessingContext source, IDither dither) => @@ -33,10 +33,10 @@ public static class DitherExtensions /// /// Dithers the image reducing it to a web-safe palette. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. /// The dithering scale used to adjust the amount of dither. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Dither( this IImageProcessingContext source, IDither dither, @@ -46,10 +46,10 @@ public static class DitherExtensions /// /// Dithers the image reducing it to the given palette. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. /// The palette to select substitute colors from. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Dither( this IImageProcessingContext source, IDither dither, @@ -59,11 +59,11 @@ public static class DitherExtensions /// /// Dithers the image reducing it to the given palette. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. /// The dithering scale used to adjust the amount of dither. /// The palette to select substitute colors from. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Dither( this IImageProcessingContext source, IDither dither, @@ -74,23 +74,23 @@ public static class DitherExtensions /// /// Dithers the image reducing it to a web-safe palette using . /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Dither(this IImageProcessingContext source, Rectangle rectangle) => Dither(source, KnownDitherings.Bayer8x8, rectangle); /// /// Dithers the image reducing it to a web-safe palette. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Dither( this IImageProcessingContext source, IDither dither, @@ -100,13 +100,13 @@ public static class DitherExtensions /// /// Dithers the image reducing it to a web-safe palette. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. /// The dithering scale used to adjust the amount of dither. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Dither( this IImageProcessingContext source, IDither dither, @@ -117,13 +117,13 @@ public static class DitherExtensions /// /// Dithers the image reducing it to the given palette. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. /// The palette to select substitute colors from. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Dither( this IImageProcessingContext source, IDither dither, @@ -134,14 +134,14 @@ public static class DitherExtensions /// /// Dithers the image reducing it to the given palette. /// - /// The image this method extends. + /// The current image processing context. /// The ordered ditherer. /// The dithering scale used to adjust the amount of dither. /// The palette to select substitute colors from. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Dither( this IImageProcessingContext source, IDither dither, diff --git a/src/ImageSharp/Processing/Extensions/Effects/OilPaintExtensions.cs b/src/ImageSharp/Processing/Extensions/Effects/OilPaintExtensions.cs index e29b39478f..2c8d76c831 100644 --- a/src/ImageSharp/Processing/Extensions/Effects/OilPaintExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Effects/OilPaintExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Effects; @@ -15,29 +15,29 @@ public static class OilPaintExtensions /// Alters the colors of the image recreating an oil painting effect with levels and brushSize /// set to 10 and 15 respectively. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext OilPaint(this IImageProcessingContext source) => OilPaint(source, 10, 15); /// /// Alters the colors of the image recreating an oil painting effect with levels and brushSize /// set to 10 and 15 respectively. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext OilPaint(this IImageProcessingContext source, Rectangle rectangle) => OilPaint(source, 10, 15, rectangle); /// /// Alters the colors of the image recreating an oil painting effect. /// - /// The image this method extends. + /// The current image processing context. /// The number of intensity levels. Higher values result in a broader range of color intensities forming part of the result image. /// The number of neighboring pixels used in calculating each individual pixel value. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext OilPaint(this IImageProcessingContext source, int levels, int brushSize) => source.ApplyProcessor(new OilPaintingProcessor(levels, brushSize)); @@ -45,13 +45,13 @@ public static class OilPaintExtensions /// /// Alters the colors of the image recreating an oil painting effect. /// - /// The image this method extends. + /// The current image processing context. /// The number of intensity levels. Higher values result in a broader range of color intensities forming part of the result image. /// The number of neighboring pixels used in calculating each individual pixel value. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext OilPaint( this IImageProcessingContext source, int levels, diff --git a/src/ImageSharp/Processing/Extensions/Effects/PixelRowDelegateExtensions.cs b/src/ImageSharp/Processing/Extensions/Effects/PixelRowDelegateExtensions.cs index e7b5d7623e..703b1b2fbb 100644 --- a/src/ImageSharp/Processing/Extensions/Effects/PixelRowDelegateExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Effects/PixelRowDelegateExtensions.cs @@ -14,88 +14,88 @@ public static class PixelRowDelegateExtensions /// /// Applies a user defined processing delegate to the image. /// - /// The image this method extends. + /// The current image processing context. /// The user defined processing delegate to use to modify image rows. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation rowOperation) => ProcessPixelRowsAsVector4(source, rowOperation, PixelConversionModifiers.None); /// /// Applies a user defined processing delegate to the image. /// - /// The image this method extends. + /// The current image processing context. /// The user defined processing delegate to use to modify image rows. /// The to apply during the pixel conversions. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation rowOperation, PixelConversionModifiers modifiers) => source.ApplyProcessor(new PixelRowDelegateProcessor(rowOperation, modifiers)); /// /// Applies a user defined processing delegate to the image. /// - /// The image this method extends. + /// The current image processing context. /// The user defined processing delegate to use to modify image rows. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation rowOperation, Rectangle rectangle) => ProcessPixelRowsAsVector4(source, rowOperation, rectangle, PixelConversionModifiers.None); /// /// Applies a user defined processing delegate to the image. /// - /// The image this method extends. + /// The current image processing context. /// The user defined processing delegate to use to modify image rows. /// /// The structure that specifies the portion of the image object to alter. /// /// The to apply during the pixel conversions. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation rowOperation, Rectangle rectangle, PixelConversionModifiers modifiers) => source.ApplyProcessor(new PixelRowDelegateProcessor(rowOperation, modifiers), rectangle); /// /// Applies a user defined processing delegate to the image. /// - /// The image this method extends. + /// The current image processing context. /// The user defined processing delegate to use to modify image rows. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation rowOperation) => ProcessPixelRowsAsVector4(source, rowOperation, PixelConversionModifiers.None); /// /// Applies a user defined processing delegate to the image. /// - /// The image this method extends. + /// The current image processing context. /// The user defined processing delegate to use to modify image rows. /// The to apply during the pixel conversions. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation rowOperation, PixelConversionModifiers modifiers) => source.ApplyProcessor(new PositionAwarePixelRowDelegateProcessor(rowOperation, modifiers)); /// /// Applies a user defined processing delegate to the image. /// - /// The image this method extends. + /// The current image processing context. /// The user defined processing delegate to use to modify image rows. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation rowOperation, Rectangle rectangle) => ProcessPixelRowsAsVector4(source, rowOperation, rectangle, PixelConversionModifiers.None); /// /// Applies a user defined processing delegate to the image. /// - /// The image this method extends. + /// The current image processing context. /// The user defined processing delegate to use to modify image rows. /// /// The structure that specifies the portion of the image object to alter. /// /// The to apply during the pixel conversions. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation rowOperation, Rectangle rectangle, PixelConversionModifiers modifiers) => source.ApplyProcessor(new PositionAwarePixelRowDelegateProcessor(rowOperation, modifiers), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Effects/PixelateExtensions.cs b/src/ImageSharp/Processing/Extensions/Effects/PixelateExtensions.cs index 17654a2061..584887ea17 100644 --- a/src/ImageSharp/Processing/Extensions/Effects/PixelateExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Effects/PixelateExtensions.cs @@ -14,28 +14,28 @@ public static class PixelateExtensions /// /// Pixelates an image with the given pixel size. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext Pixelate(this IImageProcessingContext source) => Pixelate(source, 4); /// /// Pixelates an image with the given pixel size. /// - /// The image this method extends. + /// The current image processing context. /// The size of the pixels. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Pixelate(this IImageProcessingContext source, int size) => source.ApplyProcessor(new PixelateProcessor(size)); /// /// Pixelates an image with the given pixel size. /// - /// The image this method extends. + /// The current image processing context. /// The size of the pixels. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Pixelate( this IImageProcessingContext source, int size, diff --git a/src/ImageSharp/Processing/Extensions/Filters/BlackWhiteExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/BlackWhiteExtensions.cs index 54f2d2143e..8e44928f9e 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/BlackWhiteExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/BlackWhiteExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Filters; @@ -14,19 +14,19 @@ public static class BlackWhiteExtensions /// /// Applies black and white toning to the image. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext BlackWhite(this IImageProcessingContext source) => source.ApplyProcessor(new BlackWhiteProcessor()); /// /// Applies black and white toning to the image. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BlackWhite(this IImageProcessingContext source, Rectangle rectangle) => source.ApplyProcessor(new BlackWhiteProcessor(), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/BrightnessExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/BrightnessExtensions.cs index e53f22040f..35140c2140 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/BrightnessExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/BrightnessExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Filters; @@ -18,9 +18,9 @@ public static class BrightnessExtensions /// A value of 0 will create an image that is completely black. A value of 1 leaves the input unchanged. /// Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing brighter results. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be greater than or equal to 0. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Brightness(this IImageProcessingContext source, float amount) => source.ApplyProcessor(new BrightnessProcessor(amount)); @@ -31,12 +31,12 @@ public static class BrightnessExtensions /// A value of 0 will create an image that is completely black. A value of 1 leaves the input unchanged. /// Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing brighter results. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be greater than or equal to 0. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Brightness(this IImageProcessingContext source, float amount, Rectangle rectangle) => source.ApplyProcessor(new BrightnessProcessor(amount), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/ColorBlindnessExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/ColorBlindnessExtensions.cs index 73c3c29a91..ed1c07a431 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/ColorBlindnessExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/ColorBlindnessExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors; @@ -15,21 +15,21 @@ public static class ColorBlindnessExtensions /// /// Applies the given colorblindness simulator to the image. /// - /// The image this method extends. + /// The current image processing context. /// The type of color blindness simulator to apply. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext ColorBlindness(this IImageProcessingContext source, ColorBlindnessMode colorBlindness) => source.ApplyProcessor(GetProcessor(colorBlindness)); /// /// Applies the given colorblindness simulator to the image. /// - /// The image this method extends. + /// The current image processing context. /// The type of color blindness simulator to apply. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext ColorBlindness(this IImageProcessingContext source, ColorBlindnessMode colorBlindnessMode, Rectangle rectangle) => source.ApplyProcessor(GetProcessor(colorBlindnessMode), rectangle); diff --git a/src/ImageSharp/Processing/Extensions/Filters/ContrastExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/ContrastExtensions.cs index 5ed5c9a21d..4dd4707bc1 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/ContrastExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/ContrastExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Filters; @@ -18,9 +18,9 @@ public static class ContrastExtensions /// A value of 0 will create an image that is completely gray. A value of 1 leaves the input unchanged. /// Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing results with more contrast. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be greater than or equal to 0. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Contrast(this IImageProcessingContext source, float amount) => source.ApplyProcessor(new ContrastProcessor(amount)); @@ -31,12 +31,12 @@ public static class ContrastExtensions /// A value of 0 will create an image that is completely gray. A value of 1 leaves the input unchanged. /// Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing results with more contrast. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be greater than or equal to 0. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Contrast(this IImageProcessingContext source, float amount, Rectangle rectangle) => source.ApplyProcessor(new ContrastProcessor(amount), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/FilterExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/FilterExtensions.cs index 051afebc97..387307b3df 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/FilterExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/FilterExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Filters; @@ -14,21 +14,21 @@ public static class FilterExtensions /// /// Filters an image by the given color matrix /// - /// The image this method extends. + /// The current image processing context. /// The filter color matrix - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Filter(this IImageProcessingContext source, ColorMatrix matrix) => source.ApplyProcessor(new FilterProcessor(matrix)); /// /// Filters an image by the given color matrix /// - /// The image this method extends. + /// The current image processing context. /// The filter color matrix /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Filter(this IImageProcessingContext source, ColorMatrix matrix, Rectangle rectangle) => source.ApplyProcessor(new FilterProcessor(matrix), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/GrayscaleExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/GrayscaleExtensions.cs index 88633719a1..86ef74394e 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/GrayscaleExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/GrayscaleExtensions.cs @@ -15,7 +15,7 @@ public static class GrayscaleExtensions /// /// Applies grayscale toning to the image. /// - /// The image this method extends. + /// The current image processing context. /// The . public static IImageProcessingContext Grayscale(this IImageProcessingContext source) => Grayscale(source, GrayscaleMode.Bt709); @@ -23,7 +23,7 @@ public static class GrayscaleExtensions /// /// Applies grayscale toning to the image using the given amount. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be between 0 and 1. /// The . public static IImageProcessingContext Grayscale(this IImageProcessingContext source, float amount) @@ -32,7 +32,7 @@ public static class GrayscaleExtensions /// /// Applies grayscale toning to the image with the given . /// - /// The image this method extends. + /// The current image processing context. /// The formula to apply to perform the operation. /// The . public static IImageProcessingContext Grayscale(this IImageProcessingContext source, GrayscaleMode mode) @@ -41,7 +41,7 @@ public static class GrayscaleExtensions /// /// Applies grayscale toning to the image with the given using the given amount. /// - /// The image this method extends. + /// The current image processing context. /// The formula to apply to perform the operation. /// The proportion of the conversion. Must be between 0 and 1. /// The . @@ -58,7 +58,7 @@ public static class GrayscaleExtensions /// /// Applies grayscale toning to the image. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// @@ -69,7 +69,7 @@ public static class GrayscaleExtensions /// /// Applies grayscale toning to the image using the given amount. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be between 0 and 1. /// /// The structure that specifies the portion of the image object to alter. @@ -81,7 +81,7 @@ public static class GrayscaleExtensions /// /// Applies grayscale toning to the image. /// - /// The image this method extends. + /// The current image processing context. /// The formula to apply to perform the operation. /// /// The structure that specifies the portion of the image object to alter. @@ -93,7 +93,7 @@ public static class GrayscaleExtensions /// /// Applies grayscale toning to the image using the given amount. /// - /// The image this method extends. + /// The current image processing context. /// The formula to apply to perform the operation. /// The proportion of the conversion. Must be between 0 and 1. /// diff --git a/src/ImageSharp/Processing/Extensions/Filters/HueExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/HueExtensions.cs index 3ec339e9c9..a493a6f828 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/HueExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/HueExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Filters; @@ -14,21 +14,21 @@ public static class HueExtensions /// /// Alters the hue component of the image. /// - /// The image this method extends. + /// The current image processing context. /// The rotation angle in degrees to adjust the hue. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Hue(this IImageProcessingContext source, float degrees) => source.ApplyProcessor(new HueProcessor(degrees)); /// /// Alters the hue component of the image. /// - /// The image this method extends. + /// The current image processing context. /// The rotation angle in degrees to adjust the hue. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Hue(this IImageProcessingContext source, float degrees, Rectangle rectangle) => source.ApplyProcessor(new HueProcessor(degrees), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/InvertExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/InvertExtensions.cs index 3c7845ec83..6b42e7da43 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/InvertExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/InvertExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Filters; @@ -14,19 +14,19 @@ public static class InvertExtensions /// /// Inverts the colors of the image. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext Invert(this IImageProcessingContext source) => source.ApplyProcessor(new InvertProcessor(1F)); /// /// Inverts the colors of the image. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Invert(this IImageProcessingContext source, Rectangle rectangle) => source.ApplyProcessor(new InvertProcessor(1F), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/KodachromeExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/KodachromeExtensions.cs index 8aa8260676..5c64e2b785 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/KodachromeExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/KodachromeExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Filters; @@ -14,19 +14,19 @@ public static class KodachromeExtensions /// /// Alters the colors of the image recreating an old Kodachrome camera effect. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext Kodachrome(this IImageProcessingContext source) => source.ApplyProcessor(new KodachromeProcessor()); /// /// Alters the colors of the image recreating an old Kodachrome camera effect. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Kodachrome(this IImageProcessingContext source, Rectangle rectangle) => source.ApplyProcessor(new KodachromeProcessor(), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/LightnessExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/LightnessExtensions.cs index fb937d9728..8542027702 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/LightnessExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/LightnessExtensions.cs @@ -18,9 +18,9 @@ public static class LightnessExtensions /// A value of 0 will create an image that is completely black. A value of 1 leaves the input unchanged. /// Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing lighter results. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be greater than or equal to 0. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Lightness(this IImageProcessingContext source, float amount) => source.ApplyProcessor(new LightnessProcessor(amount)); @@ -31,12 +31,12 @@ public static class LightnessExtensions /// A value of 0 will create an image that is completely black. A value of 1 leaves the input unchanged. /// Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing lighter results. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be greater than or equal to 0. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Lightness(this IImageProcessingContext source, float amount, Rectangle rectangle) => source.ApplyProcessor(new LightnessProcessor(amount), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/LomographExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/LomographExtensions.cs index 816647bd42..8942fdde01 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/LomographExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/LomographExtensions.cs @@ -14,19 +14,19 @@ public static class LomographExtensions /// /// Alters the colors of the image recreating an old Lomograph camera effect. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext Lomograph(this IImageProcessingContext source) => source.ApplyProcessor(new LomographProcessor(source.GetGraphicsOptions())); /// /// Alters the colors of the image recreating an old Lomograph camera effect. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Lomograph(this IImageProcessingContext source, Rectangle rectangle) => source.ApplyProcessor(new LomographProcessor(source.GetGraphicsOptions()), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/OpacityExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/OpacityExtensions.cs index e704dd763c..467b98d52b 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/OpacityExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/OpacityExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Filters; @@ -14,21 +14,21 @@ public static class OpacityExtensions /// /// Multiplies the alpha component of the image. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be between 0 and 1. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Opacity(this IImageProcessingContext source, float amount) => source.ApplyProcessor(new OpacityProcessor(amount)); /// /// Multiplies the alpha component of the image. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be between 0 and 1. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Opacity(this IImageProcessingContext source, float amount, Rectangle rectangle) => source.ApplyProcessor(new OpacityProcessor(amount), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/PolaroidExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/PolaroidExtensions.cs index bab05c0365..41678e4313 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/PolaroidExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/PolaroidExtensions.cs @@ -14,19 +14,19 @@ public static class PolaroidExtensions /// /// Alters the colors of the image recreating an old Polaroid camera effect. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext Polaroid(this IImageProcessingContext source) => source.ApplyProcessor(new PolaroidProcessor(source.GetGraphicsOptions())); /// /// Alters the colors of the image recreating an old Polaroid camera effect. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Polaroid(this IImageProcessingContext source, Rectangle rectangle) => source.ApplyProcessor(new PolaroidProcessor(source.GetGraphicsOptions()), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/SaturateExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/SaturateExtensions.cs index 03e6ddcba5..5bf9c737ee 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/SaturateExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/SaturateExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Filters; @@ -18,9 +18,9 @@ public static class SaturateExtensions /// A value of 0 is completely un-saturated. A value of 1 leaves the input unchanged. /// Other values are linear multipliers on the effect. Values of amount over 1 are allowed, providing super-saturated results /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be greater than or equal to 0. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Saturate(this IImageProcessingContext source, float amount) => source.ApplyProcessor(new SaturateProcessor(amount)); @@ -31,12 +31,12 @@ public static class SaturateExtensions /// A value of 0 is completely un-saturated. A value of 1 leaves the input unchanged. /// Other values are linear multipliers on the effect. Values of amount over 1 are allowed, providing super-saturated results /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be greater than or equal to 0. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Saturate(this IImageProcessingContext source, float amount, Rectangle rectangle) => source.ApplyProcessor(new SaturateProcessor(amount), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Filters/SepiaExtensions.cs b/src/ImageSharp/Processing/Extensions/Filters/SepiaExtensions.cs index 01ddccba0d..af00b9b329 100644 --- a/src/ImageSharp/Processing/Extensions/Filters/SepiaExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Filters/SepiaExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Filters; @@ -14,40 +14,40 @@ public static class SepiaExtensions /// /// Applies sepia toning to the image. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext Sepia(this IImageProcessingContext source) => Sepia(source, 1F); /// /// Applies sepia toning to the image using the given amount. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be between 0 and 1. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Sepia(this IImageProcessingContext source, float amount) => source.ApplyProcessor(new SepiaProcessor(amount)); /// /// Applies sepia toning to the image. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Sepia(this IImageProcessingContext source, Rectangle rectangle) => Sepia(source, 1F, rectangle); /// /// Applies sepia toning to the image. /// - /// The image this method extends. + /// The current image processing context. /// The proportion of the conversion. Must be between 0 and 1. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Sepia(this IImageProcessingContext source, float amount, Rectangle rectangle) => source.ApplyProcessor(new SepiaProcessor(amount), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Normalization/HistogramEqualizationExtensions.cs b/src/ImageSharp/Processing/Extensions/Normalization/HistogramEqualizationExtensions.cs index ab5b8e3e1b..d7f4ba3594 100644 --- a/src/ImageSharp/Processing/Extensions/Normalization/HistogramEqualizationExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Normalization/HistogramEqualizationExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Normalization; @@ -13,17 +13,17 @@ public static class HistogramEqualizationExtensions /// /// Equalizes the histogram of an image to increases the contrast. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext HistogramEqualization(this IImageProcessingContext source) => HistogramEqualization(source, new HistogramEqualizationOptions()); /// /// Equalizes the histogram of an image to increases the contrast. /// - /// The image this method extends. + /// The current image processing context. /// The histogram equalization options to use. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext HistogramEqualization( this IImageProcessingContext source, HistogramEqualizationOptions options) => diff --git a/src/ImageSharp/Processing/Extensions/Overlays/BackgroundColorExtensions.cs b/src/ImageSharp/Processing/Extensions/Overlays/BackgroundColorExtensions.cs index 4369f45326..938c880f60 100644 --- a/src/ImageSharp/Processing/Extensions/Overlays/BackgroundColorExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Overlays/BackgroundColorExtensions.cs @@ -14,21 +14,21 @@ public static class BackgroundColorExtensions /// /// Replaces the background color of image with the given one. /// - /// The image this method extends. + /// The current image processing context. /// The color to set as the background. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BackgroundColor(this IImageProcessingContext source, Color color) => BackgroundColor(source, source.GetGraphicsOptions(), color); /// /// Replaces the background color of image with the given one. /// - /// The image this method extends. + /// The current image processing context. /// The color to set as the background. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BackgroundColor( this IImageProcessingContext source, Color color, @@ -38,10 +38,10 @@ public static class BackgroundColorExtensions /// /// Replaces the background color of image with the given one. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting pixel blending. /// The color to set as the background. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BackgroundColor( this IImageProcessingContext source, GraphicsOptions options, @@ -51,13 +51,13 @@ public static class BackgroundColorExtensions /// /// Replaces the background color of image with the given one. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting pixel blending. /// The color to set as the background. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext BackgroundColor( this IImageProcessingContext source, GraphicsOptions options, diff --git a/src/ImageSharp/Processing/Extensions/Overlays/GlowExtensions.cs b/src/ImageSharp/Processing/Extensions/Overlays/GlowExtensions.cs index c588ae9647..9e00f5b304 100644 --- a/src/ImageSharp/Processing/Extensions/Overlays/GlowExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Overlays/GlowExtensions.cs @@ -14,17 +14,17 @@ public static class GlowExtensions /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext Glow(this IImageProcessingContext source) => Glow(source, source.GetGraphicsOptions()); /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The color to set as the glow. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Glow(this IImageProcessingContext source, Color color) { return Glow(source, source.GetGraphicsOptions(), color); @@ -33,33 +33,33 @@ public static class GlowExtensions /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The the radius. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Glow(this IImageProcessingContext source, float radius) => Glow(source, source.GetGraphicsOptions(), radius); /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Glow(this IImageProcessingContext source, Rectangle rectangle) => source.Glow(source.GetGraphicsOptions(), rectangle); /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The color to set as the glow. /// The the radius. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Glow( this IImageProcessingContext source, Color color, @@ -70,19 +70,19 @@ public static class GlowExtensions /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting things like blending. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Glow(this IImageProcessingContext source, GraphicsOptions options) => source.Glow(options, Color.Black, ValueSize.PercentageOfWidth(0.5f)); /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting things like blending. /// The color to set as the glow. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Glow( this IImageProcessingContext source, GraphicsOptions options, @@ -92,10 +92,10 @@ public static class GlowExtensions /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting things like blending. /// The the radius. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Glow( this IImageProcessingContext source, GraphicsOptions options, @@ -105,12 +105,12 @@ public static class GlowExtensions /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting things like blending. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Glow( this IImageProcessingContext source, GraphicsOptions options, @@ -120,14 +120,14 @@ public static class GlowExtensions /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting things like blending. /// The color to set as the glow. /// The the radius. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Glow( this IImageProcessingContext source, GraphicsOptions options, @@ -139,14 +139,14 @@ public static class GlowExtensions /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting things like blending. /// The color to set as the glow. /// The the radius. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . private static IImageProcessingContext Glow( this IImageProcessingContext source, GraphicsOptions options, @@ -158,11 +158,11 @@ public static class GlowExtensions /// /// Applies a radial glow effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting things like blending. /// The color to set as the glow. /// The the radius. - /// The to allow chaining of operations. + /// The . private static IImageProcessingContext Glow( this IImageProcessingContext source, GraphicsOptions options, diff --git a/src/ImageSharp/Processing/Extensions/Overlays/VignetteExtensions.cs b/src/ImageSharp/Processing/Extensions/Overlays/VignetteExtensions.cs index 379a2f32ab..fb9f79d411 100644 --- a/src/ImageSharp/Processing/Extensions/Overlays/VignetteExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Overlays/VignetteExtensions.cs @@ -14,27 +14,27 @@ public static class VignetteExtensions /// /// Applies a radial vignette effect to an image. /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext Vignette(this IImageProcessingContext source) => Vignette(source, source.GetGraphicsOptions()); /// /// Applies a radial vignette effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The color to set as the vignette. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Vignette(this IImageProcessingContext source, Color color) => Vignette(source, source.GetGraphicsOptions(), color); /// /// Applies a radial vignette effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The the x-radius. /// The the y-radius. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Vignette( this IImageProcessingContext source, float radiusX, @@ -44,25 +44,25 @@ public static class VignetteExtensions /// /// Applies a radial vignette effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Vignette(this IImageProcessingContext source, Rectangle rectangle) => Vignette(source, source.GetGraphicsOptions(), rectangle); /// /// Applies a radial vignette effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The color to set as the vignette. /// The the x-radius. /// The the y-radius. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Vignette( this IImageProcessingContext source, Color color, @@ -74,9 +74,9 @@ public static class VignetteExtensions /// /// Applies a radial vignette effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting pixel blending. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Vignette(this IImageProcessingContext source, GraphicsOptions options) => source.VignetteInternal( options, @@ -87,10 +87,10 @@ public static class VignetteExtensions /// /// Applies a radial vignette effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting pixel blending. /// The color to set as the vignette. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Vignette( this IImageProcessingContext source, GraphicsOptions options, @@ -104,11 +104,11 @@ public static class VignetteExtensions /// /// Applies a radial vignette effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting pixel blending. /// The the x-radius. /// The the y-radius. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Vignette( this IImageProcessingContext source, GraphicsOptions options, @@ -119,12 +119,12 @@ public static class VignetteExtensions /// /// Applies a radial vignette effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting pixel blending. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Vignette( this IImageProcessingContext source, GraphicsOptions options, @@ -139,7 +139,7 @@ public static class VignetteExtensions /// /// Applies a radial vignette effect to an image. /// - /// The image this method extends. + /// The current image processing context. /// The options effecting pixel blending. /// The color to set as the vignette. /// The the x-radius. @@ -147,7 +147,7 @@ public static class VignetteExtensions /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Vignette( this IImageProcessingContext source, GraphicsOptions options, diff --git a/src/ImageSharp/Processing/Extensions/Quantization/QuantizeExtensions.cs b/src/ImageSharp/Processing/Extensions/Quantization/QuantizeExtensions.cs index 559477a05e..bf6d2221f4 100644 --- a/src/ImageSharp/Processing/Extensions/Quantization/QuantizeExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Quantization/QuantizeExtensions.cs @@ -14,40 +14,40 @@ public static class QuantizeExtensions /// /// Applies quantization to the image using the . /// - /// The image this method extends. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext Quantize(this IImageProcessingContext source) => Quantize(source, KnownQuantizers.Octree); /// /// Applies quantization to the image. /// - /// The image this method extends. + /// The current image processing context. /// The quantizer to apply to perform the operation. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Quantize(this IImageProcessingContext source, IQuantizer quantizer) => source.ApplyProcessor(new QuantizeProcessor(quantizer)); /// /// Applies quantization to the image using the . /// - /// The image this method extends. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Quantize(this IImageProcessingContext source, Rectangle rectangle) => Quantize(source, KnownQuantizers.Octree, rectangle); /// /// Applies quantization to the image. /// - /// The image this method extends. + /// The current image processing context. /// The quantizer to apply to perform the operation. /// /// The structure that specifies the portion of the image object to alter. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Quantize(this IImageProcessingContext source, IQuantizer quantizer, Rectangle rectangle) => source.ApplyProcessor(new QuantizeProcessor(quantizer), rectangle); } diff --git a/src/ImageSharp/Processing/Extensions/Transforms/AutoOrientExtensions.cs b/src/ImageSharp/Processing/Extensions/Transforms/AutoOrientExtensions.cs index a7b8dbf43f..fcd0023e53 100644 --- a/src/ImageSharp/Processing/Extensions/Transforms/AutoOrientExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Transforms/AutoOrientExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Transforms; @@ -14,8 +14,8 @@ public static class AutoOrientExtensions /// /// Adjusts an image so that its orientation is suitable for viewing. Adjustments are based on EXIF metadata embedded in the image. /// - /// The image to auto rotate. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext AutoOrient(this IImageProcessingContext source) => source.ApplyProcessor(new AutoOrientProcessor()); } diff --git a/src/ImageSharp/Processing/Extensions/Transforms/CropExtensions.cs b/src/ImageSharp/Processing/Extensions/Transforms/CropExtensions.cs index 434aeb6582..3025806d4f 100644 --- a/src/ImageSharp/Processing/Extensions/Transforms/CropExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Transforms/CropExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Transforms; @@ -14,21 +14,21 @@ public static class CropExtensions /// /// Crops an image to the given width and height. /// - /// The image to resize. + /// The current image processing context. /// The target image width. /// The target image height. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Crop(this IImageProcessingContext source, int width, int height) => Crop(source, new Rectangle(0, 0, width, height)); /// /// Crops an image to the given rectangle. /// - /// The image to crop. + /// The current image processing context. /// /// The structure that specifies the portion of the image object to retain. /// - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Crop(this IImageProcessingContext source, Rectangle cropRectangle) => source.ApplyProcessor(new CropProcessor(cropRectangle, source.GetCurrentSize())); } diff --git a/src/ImageSharp/Processing/Extensions/Transforms/EntropyCropExtensions.cs b/src/ImageSharp/Processing/Extensions/Transforms/EntropyCropExtensions.cs index 14e7f9f134..6461a4e8aa 100644 --- a/src/ImageSharp/Processing/Extensions/Transforms/EntropyCropExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Transforms/EntropyCropExtensions.cs @@ -14,17 +14,17 @@ public static class EntropyCropExtensions /// /// Crops an image to the area of greatest entropy using a threshold for entropic density of .5F. /// - /// The image to crop. - /// The to allow chaining of operations. + /// The current image processing context. + /// The . public static IImageProcessingContext EntropyCrop(this IImageProcessingContext source) => source.ApplyProcessor(new EntropyCropProcessor()); /// /// Crops an image to the area of greatest entropy. /// - /// The image to crop. + /// The current image processing context. /// The threshold for entropic density. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext EntropyCrop(this IImageProcessingContext source, float threshold) => source.ApplyProcessor(new EntropyCropProcessor(threshold)); } diff --git a/src/ImageSharp/Processing/Extensions/Transforms/FlipExtensions.cs b/src/ImageSharp/Processing/Extensions/Transforms/FlipExtensions.cs index 243d818b84..3828572a60 100644 --- a/src/ImageSharp/Processing/Extensions/Transforms/FlipExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Transforms/FlipExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Transforms; @@ -14,9 +14,9 @@ public static class FlipExtensions /// /// Flips an image by the given instructions. /// - /// The image to rotate, flip, or both. + /// The current image processing context. /// The to perform the flip. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Flip(this IImageProcessingContext source, FlipMode flipMode) => source.ApplyProcessor(new FlipProcessor(flipMode)); } diff --git a/src/ImageSharp/Processing/Extensions/Transforms/PadExtensions.cs b/src/ImageSharp/Processing/Extensions/Transforms/PadExtensions.cs index dfade98475..b6db0172dc 100644 --- a/src/ImageSharp/Processing/Extensions/Transforms/PadExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Transforms/PadExtensions.cs @@ -12,21 +12,21 @@ public static class PadExtensions /// /// Evenly pads an image to fit the new dimensions. /// - /// The source image to pad. + /// The current image processing context. /// The new width. /// The new height. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Pad(this IImageProcessingContext source, int width, int height) => source.Pad(width, height, default); /// /// Evenly pads an image to fit the new dimensions with the given background color. /// - /// The source image to pad. + /// The current image processing context. /// The new width. /// The new height. /// The background color with which to pad the image. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Pad(this IImageProcessingContext source, int width, int height, Color color) { Size size = source.GetCurrentSize(); diff --git a/src/ImageSharp/Processing/Extensions/Transforms/ResizeExtensions.cs b/src/ImageSharp/Processing/Extensions/Transforms/ResizeExtensions.cs index 7580f64690..01f296d096 100644 --- a/src/ImageSharp/Processing/Extensions/Transforms/ResizeExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Transforms/ResizeExtensions.cs @@ -14,9 +14,9 @@ public static class ResizeExtensions /// /// Resizes an image to the given . /// - /// The image to resize. + /// The current image processing context. /// The target image size. - /// The to allow chaining of operations. + /// The . /// Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio. public static IImageProcessingContext Resize(this IImageProcessingContext source, Size size) => Resize(source, size.Width, size.Height, KnownResamplers.Bicubic, false); @@ -24,10 +24,10 @@ public static class ResizeExtensions /// /// Resizes an image to the given . /// - /// The image to resize. + /// The current image processing context. /// The target image size. /// Whether to compress and expand the image color-space to gamma correct the image during processing. - /// The to allow chaining of operations. + /// The . /// Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio. public static IImageProcessingContext Resize(this IImageProcessingContext source, Size size, bool compand) => Resize(source, size.Width, size.Height, KnownResamplers.Bicubic, compand); @@ -35,10 +35,10 @@ public static class ResizeExtensions /// /// Resizes an image to the given width and height. /// - /// The image to resize. + /// The current image processing context. /// The target image width. /// The target image height. - /// The to allow chaining of operations. + /// The . /// Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio. public static IImageProcessingContext Resize(this IImageProcessingContext source, int width, int height) => Resize(source, width, height, KnownResamplers.Bicubic, false); @@ -46,11 +46,11 @@ public static class ResizeExtensions /// /// Resizes an image to the given width and height. /// - /// The image to resize. + /// The current image processing context. /// The target image width. /// The target image height. /// Whether to compress and expand the image color-space to gamma correct the image during processing. - /// The to allow chaining of operations. + /// The . /// Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio. public static IImageProcessingContext Resize(this IImageProcessingContext source, int width, int height, bool compand) => Resize(source, width, height, KnownResamplers.Bicubic, compand); @@ -58,11 +58,11 @@ public static class ResizeExtensions /// /// Resizes an image to the given width and height with the given sampler. /// - /// The image to resize. + /// The current image processing context. /// The target image width. /// The target image height. /// The to perform the resampling. - /// The to allow chaining of operations. + /// The . /// Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio. public static IImageProcessingContext Resize(this IImageProcessingContext source, int width, int height, IResampler sampler) => Resize(source, width, height, sampler, false); @@ -70,11 +70,11 @@ public static class ResizeExtensions /// /// Resizes an image to the given width and height with the given sampler. /// - /// The image to resize. + /// The current image processing context. /// The target image size. /// The to perform the resampling. /// Whether to compress and expand the image color-space to gamma correct the image during processing. - /// The to allow chaining of operations. + /// The . /// Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio. 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); @@ -82,12 +82,12 @@ public static class ResizeExtensions /// /// Resizes an image to the given width and height with the given sampler. /// - /// The image to resize. + /// The current image processing context. /// The target image width. /// The target image height. /// The to perform the resampling. /// Whether to compress and expand the image color-space to gamma correct the image during processing. - /// The to allow chaining of operations. + /// The . /// Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio. 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); @@ -96,7 +96,7 @@ public static class ResizeExtensions /// Resizes an image to the given width and height with the given sampler and /// source rectangle. /// - /// The image to resize. + /// The current image processing context. /// The target image width. /// The target image height. /// The to perform the resampling. @@ -107,7 +107,7 @@ public static class ResizeExtensions /// The structure that specifies the portion of the target image object to draw to. /// /// Whether to compress and expand the image color-space to gamma correct the image during processing. - /// The to allow chaining of operations. + /// The . /// Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio. public static IImageProcessingContext Resize( this IImageProcessingContext source, @@ -133,7 +133,7 @@ public static class ResizeExtensions /// /// Resizes an image to the given width and height with the given sampler and source rectangle. /// - /// The image to resize. + /// The current image processing context. /// The target image width. /// The target image height. /// The to perform the resampling. @@ -141,7 +141,7 @@ public static class ResizeExtensions /// The structure that specifies the portion of the target image object to draw to. /// /// Whether to compress and expand the image color-space to gamma correct the image during processing. - /// The to allow chaining of operations. + /// The . /// Passing zero for one of height or width will automatically preserve the aspect ratio of the original image or the nearest possible ratio. public static IImageProcessingContext Resize( this IImageProcessingContext source, @@ -166,9 +166,9 @@ public static class ResizeExtensions /// /// Resizes an image in accordance with the given . /// - /// The image to resize. + /// The current image processing context. /// The resize options. - /// The to allow chaining of operations. + /// The . /// 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. public static IImageProcessingContext Resize(this IImageProcessingContext source, ResizeOptions options) => source.ApplyProcessor(new ResizeProcessor(options, source.GetCurrentSize())); diff --git a/src/ImageSharp/Processing/Extensions/Transforms/RotateExtensions.cs b/src/ImageSharp/Processing/Extensions/Transforms/RotateExtensions.cs index ac3c464468..fdf28c595f 100644 --- a/src/ImageSharp/Processing/Extensions/Transforms/RotateExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Transforms/RotateExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Transforms; @@ -14,28 +14,28 @@ public static class RotateExtensions /// /// Rotates and flips an image by the given instructions. /// - /// The image to rotate. + /// The current image processing context. /// The to perform the rotation. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Rotate(this IImageProcessingContext source, RotateMode rotateMode) => Rotate(source, (float)rotateMode); /// /// Rotates an image by the given angle in degrees. /// - /// The image to rotate. + /// The current image processing context. /// The angle in degrees to perform the rotation. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Rotate(this IImageProcessingContext source, float degrees) => Rotate(source, degrees, KnownResamplers.Bicubic); /// /// Rotates an image by the given angle in degrees using the specified sampling algorithm. /// - /// The image to rotate. + /// The current image processing context. /// The angle in degrees to perform the rotation. /// The to perform the resampling. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Rotate( this IImageProcessingContext source, float degrees, diff --git a/src/ImageSharp/Processing/Extensions/Transforms/RotateFlipExtensions.cs b/src/ImageSharp/Processing/Extensions/Transforms/RotateFlipExtensions.cs index fe66af6aa6..4dc324b5ba 100644 --- a/src/ImageSharp/Processing/Extensions/Transforms/RotateFlipExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Transforms/RotateFlipExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. namespace SixLabors.ImageSharp.Processing; @@ -12,10 +12,10 @@ public static class RotateFlipExtensions /// /// Rotates and flips an image by the given instructions. /// - /// The image to rotate, flip, or both. + /// The current image processing context. /// The to perform the rotation. /// The to perform the flip. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext RotateFlip(this IImageProcessingContext source, RotateMode rotateMode, FlipMode flipMode) => source.Rotate(rotateMode).Flip(flipMode); } diff --git a/src/ImageSharp/Processing/Extensions/Transforms/SkewExtensions.cs b/src/ImageSharp/Processing/Extensions/Transforms/SkewExtensions.cs index 6b2b8b15f9..09c41b567c 100644 --- a/src/ImageSharp/Processing/Extensions/Transforms/SkewExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Transforms/SkewExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using SixLabors.ImageSharp.Processing.Processors.Transforms; @@ -14,10 +14,10 @@ public static class SkewExtensions /// /// Skews an image by the given angles in degrees. /// - /// The image to skew. + /// The current image processing context. /// The angle in degrees to perform the skew along the x-axis. /// The angle in degrees to perform the skew along the y-axis. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Skew(this IImageProcessingContext source, float degreesX, float degreesY) => Skew(source, degreesX, degreesY, KnownResamplers.Bicubic); @@ -25,11 +25,11 @@ public static class SkewExtensions /// /// Skews an image by the given angles in degrees using the specified sampling algorithm. /// - /// The image to skew. + /// The current image processing context. /// The angle in degrees to perform the skew along the x-axis. /// The angle in degrees to perform the skew along the y-axis. /// The to perform the resampling. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Skew( this IImageProcessingContext source, float degreesX, diff --git a/src/ImageSharp/Processing/Extensions/Transforms/SwizzleExtensions.cs b/src/ImageSharp/Processing/Extensions/Transforms/SwizzleExtensions.cs index 73ec111c95..4e107a4f0a 100644 --- a/src/ImageSharp/Processing/Extensions/Transforms/SwizzleExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Transforms/SwizzleExtensions.cs @@ -13,10 +13,10 @@ public static class SwizzleExtensions /// /// Swizzles an image. /// - /// The image to swizzle. + /// The current image processing context. /// The swizzler function. /// The swizzler function type. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Swizzle(this IImageProcessingContext source, TSwizzler swizzler) where TSwizzler : struct, ISwizzler => source.ApplyProcessor(new SwizzleProcessor(swizzler)); diff --git a/src/ImageSharp/Processing/Extensions/Transforms/TransformExtensions.cs b/src/ImageSharp/Processing/Extensions/Transforms/TransformExtensions.cs index fbf3b3a6df..e88f000a7c 100644 --- a/src/ImageSharp/Processing/Extensions/Transforms/TransformExtensions.cs +++ b/src/ImageSharp/Processing/Extensions/Transforms/TransformExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using System.Numerics; @@ -15,9 +15,9 @@ public static class TransformExtensions /// /// Performs an affine transform of an image. /// - /// The image to transform. + /// The current image processing context. /// The affine transform builder. - /// The + /// The . public static IImageProcessingContext Transform( this IImageProcessingContext source, AffineTransformBuilder builder) => @@ -26,62 +26,60 @@ public static class TransformExtensions /// /// Performs an affine transform of an image using the specified sampling algorithm. /// - /// The . + /// The current image processing context. /// The affine transform builder. /// The to perform the resampling. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Transform( - this IImageProcessingContext ctx, + this IImageProcessingContext source, AffineTransformBuilder builder, IResampler sampler) => - ctx.Transform(new Rectangle(Point.Empty, ctx.GetCurrentSize()), builder, sampler); + source.Transform(new Rectangle(Point.Empty, source.GetCurrentSize()), builder, sampler); /// /// Performs an affine transform of an image using the specified sampling algorithm. /// - /// The . + /// The current image processing context. /// The source rectangle /// The affine transform builder. /// The to perform the resampling. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Transform( - this IImageProcessingContext ctx, + this IImageProcessingContext source, Rectangle sourceRectangle, AffineTransformBuilder builder, IResampler sampler) { Matrix3x2 transform = builder.BuildMatrix(sourceRectangle); Size targetDimensions = TransformUtils.GetTransformedSize(sourceRectangle.Size, transform); - return ctx.Transform(sourceRectangle, transform, targetDimensions, sampler); + return source.Transform(sourceRectangle, transform, targetDimensions, sampler); } /// /// Performs an affine transform of an image using the specified sampling algorithm. /// - /// The . + /// The current image processing context. /// The source rectangle /// The transformation matrix. /// The size of the result image. /// The to perform the resampling. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Transform( - this IImageProcessingContext ctx, + this IImageProcessingContext source, Rectangle sourceRectangle, Matrix3x2 transform, Size targetDimensions, IResampler sampler) - { - return ctx.ApplyProcessor( + => source.ApplyProcessor( new AffineTransformProcessor(transform, sampler, targetDimensions), sourceRectangle); - } /// /// Performs a projective transform of an image. /// - /// The image to transform. + /// The current image processing context. /// The affine transform builder. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Transform( this IImageProcessingContext source, ProjectiveTransformBuilder builder) => @@ -90,53 +88,51 @@ public static class TransformExtensions /// /// Performs a projective transform of an image using the specified sampling algorithm. /// - /// The . + /// The current image processing context. /// The projective transform builder. /// The to perform the resampling. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Transform( - this IImageProcessingContext ctx, + this IImageProcessingContext source, ProjectiveTransformBuilder builder, IResampler sampler) => - ctx.Transform(new Rectangle(Point.Empty, ctx.GetCurrentSize()), builder, sampler); + source.Transform(new Rectangle(Point.Empty, source.GetCurrentSize()), builder, sampler); /// /// Performs a projective transform of an image using the specified sampling algorithm. /// - /// The . + /// The current image processing context. /// The source rectangle /// The projective transform builder. /// The to perform the resampling. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Transform( - this IImageProcessingContext ctx, + this IImageProcessingContext source, Rectangle sourceRectangle, ProjectiveTransformBuilder builder, IResampler sampler) { Matrix4x4 transform = builder.BuildMatrix(sourceRectangle); Size targetDimensions = TransformUtils.GetTransformedSize(sourceRectangle.Size, transform); - return ctx.Transform(sourceRectangle, transform, targetDimensions, sampler); + return source.Transform(sourceRectangle, transform, targetDimensions, sampler); } /// /// Performs a projective transform of an image using the specified sampling algorithm. /// - /// The . + /// The current image processing context. /// The source rectangle /// The transformation matrix. /// The size of the result image. /// The to perform the resampling. - /// The to allow chaining of operations. + /// The . public static IImageProcessingContext Transform( - this IImageProcessingContext ctx, + this IImageProcessingContext source, Rectangle sourceRectangle, Matrix4x4 transform, Size targetDimensions, IResampler sampler) - { - return ctx.ApplyProcessor( + => source.ApplyProcessor( new ProjectiveTransformProcessor(transform, sampler, targetDimensions), sourceRectangle); - } }