From 4676cb794d71a49dfa94b55f1e24ba9ee51751c0 Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Tue, 11 Jul 2017 22:18:23 +0100 Subject: [PATCH] fix warnings --- samples/AvatarWithRoundedCorner/Program.cs | 1 - src/ImageSharp/Processing/Binarization/Dither.cs | 3 +-- src/ImageSharp/Processing/Convolution/BoxBlur.cs | 1 - src/ImageSharp/Processing/Convolution/DetectEdges.cs | 1 - src/ImageSharp/Processing/Convolution/GaussianBlur.cs | 2 +- src/ImageSharp/Processing/Convolution/GaussianSharpen.cs | 1 - src/ImageSharp/Processing/Delegate.cs | 1 - src/ImageSharp/Processing/Effects/Pixelate.cs | 1 - .../General/PixelConversion_ConvertFromRgba32.cs | 2 +- .../General/PixelConversion_ConvertFromVector4.cs | 2 +- .../General/PixelConversion_ConvertToRgba32.cs | 2 +- 11 files changed, 5 insertions(+), 12 deletions(-) diff --git a/samples/AvatarWithRoundedCorner/Program.cs b/samples/AvatarWithRoundedCorner/Program.cs index d519fc1edb..0cd484737d 100644 --- a/samples/AvatarWithRoundedCorner/Program.cs +++ b/samples/AvatarWithRoundedCorner/Program.cs @@ -68,7 +68,6 @@ namespace AvatarWithRoundedCorner // corner is now a corner shape positions top left //lets make 3 more positioned correctly, we cando that by translating the orgional artound the center of the image var center = new Vector2(imageWidth / 2, imageHeight / 2); - var angle = Math.PI / 2f; float rightPos = imageWidth - cornerToptLeft.Bounds.Width + 1; float bottomPos = imageHeight - cornerToptLeft.Bounds.Height + 1; diff --git a/src/ImageSharp/Processing/Binarization/Dither.cs b/src/ImageSharp/Processing/Binarization/Dither.cs index ce5e8c205c..fc5193c33f 100644 --- a/src/ImageSharp/Processing/Binarization/Dither.cs +++ b/src/ImageSharp/Processing/Binarization/Dither.cs @@ -23,7 +23,6 @@ namespace ImageSharp /// The pixel format. /// The image this method extends. /// The ordered ditherer. - /// The component index to test the threshold against. Must range from 0 to 3. /// The . public static IImageOperations Dither(this IImageOperations source, IOrderedDither dither) where TPixel : struct, IPixel @@ -31,6 +30,7 @@ namespace ImageSharp source.ApplyProcessor(new OrderedDitherProcessor(dither, 0)); return source; } + /// /// Dithers the image reducing it to two colors using ordered dithering. /// @@ -55,7 +55,6 @@ namespace ImageSharp /// /// The structure that specifies the portion of the image object to alter. /// - /// The component index to test the threshold against. Must range from 0 to 3. /// The . public static IImageOperations Dither(this IImageOperations source, IOrderedDither dither, Rectangle rectangle) where TPixel : struct, IPixel diff --git a/src/ImageSharp/Processing/Convolution/BoxBlur.cs b/src/ImageSharp/Processing/Convolution/BoxBlur.cs index 1a89ac1a0e..cc0931215c 100644 --- a/src/ImageSharp/Processing/Convolution/BoxBlur.cs +++ b/src/ImageSharp/Processing/Convolution/BoxBlur.cs @@ -22,7 +22,6 @@ namespace ImageSharp /// /// The pixel format. /// The image this method extends. - /// The 'radius' value representing the size of the area to sample. /// The . public static IImageOperations BoxBlur(this IImageOperations source) where TPixel : struct, IPixel diff --git a/src/ImageSharp/Processing/Convolution/DetectEdges.cs b/src/ImageSharp/Processing/Convolution/DetectEdges.cs index b4382f902b..18006752f9 100644 --- a/src/ImageSharp/Processing/Convolution/DetectEdges.cs +++ b/src/ImageSharp/Processing/Convolution/DetectEdges.cs @@ -53,7 +53,6 @@ namespace ImageSharp /// The pixel format. /// The image this method extends. /// The filter for detecting edges. - /// Whether to convert the image to Grayscale first. Defaults to true. /// The . public static IImageOperations DetectEdges(this IImageOperations source, EdgeDetection filter) where TPixel : struct, IPixel diff --git a/src/ImageSharp/Processing/Convolution/GaussianBlur.cs b/src/ImageSharp/Processing/Convolution/GaussianBlur.cs index 91f5635050..953a576fc6 100644 --- a/src/ImageSharp/Processing/Convolution/GaussianBlur.cs +++ b/src/ImageSharp/Processing/Convolution/GaussianBlur.cs @@ -23,11 +23,11 @@ namespace ImageSharp /// /// The pixel format. /// The image this method extends. - /// The 'sigma' value representing the weight of the blur. /// The . public static IImageOperations GaussianBlur(this IImageOperations source) where TPixel : struct, IPixel => source.ApplyProcessor(new GaussianBlurProcessor(3f)); + /// /// Applies a Gaussian blur to the image. /// diff --git a/src/ImageSharp/Processing/Convolution/GaussianSharpen.cs b/src/ImageSharp/Processing/Convolution/GaussianSharpen.cs index 1fd003d128..1d0cce2229 100644 --- a/src/ImageSharp/Processing/Convolution/GaussianSharpen.cs +++ b/src/ImageSharp/Processing/Convolution/GaussianSharpen.cs @@ -23,7 +23,6 @@ namespace ImageSharp /// /// The pixel format. /// The image this method extends. - /// The 'sigma' value representing the weight of the blur. /// The . public static IImageOperations GaussianSharpen(this IImageOperations source) where TPixel : struct, IPixel diff --git a/src/ImageSharp/Processing/Delegate.cs b/src/ImageSharp/Processing/Delegate.cs index a6efb711bf..52ec736f5d 100644 --- a/src/ImageSharp/Processing/Delegate.cs +++ b/src/ImageSharp/Processing/Delegate.cs @@ -26,6 +26,5 @@ namespace ImageSharp public static IImageOperations Run(this IImageOperations source, Action> operation) where TPixel : struct, IPixel => source.ApplyProcessor(new DelegateProcessor(operation)); - } } diff --git a/src/ImageSharp/Processing/Effects/Pixelate.cs b/src/ImageSharp/Processing/Effects/Pixelate.cs index 8447f5ba17..b9403b765c 100644 --- a/src/ImageSharp/Processing/Effects/Pixelate.cs +++ b/src/ImageSharp/Processing/Effects/Pixelate.cs @@ -22,7 +22,6 @@ namespace ImageSharp /// /// The pixel format. /// The image this method extends. - /// The size of the pixels. /// The . public static IImageOperations Pixelate(this IImageOperations source) where TPixel : struct, IPixel diff --git a/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertFromRgba32.cs b/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertFromRgba32.cs index e096fd828c..0f025c9a40 100644 --- a/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertFromRgba32.cs +++ b/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertFromRgba32.cs @@ -142,7 +142,7 @@ namespace ImageSharp.Benchmarks.General [Params(32)] public int Count { get; set; } - [Setup] + [GlobalSetup] public void Setup() { this.compatibleMemLayoutRunner = new ConversionRunner(this.Count); diff --git a/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertFromVector4.cs b/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertFromVector4.cs index 721ac121a3..357ac307e4 100644 --- a/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertFromVector4.cs +++ b/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertFromVector4.cs @@ -108,7 +108,7 @@ namespace ImageSharp.Benchmarks.General [Params(32)] public int Count { get; set; } - [Setup] + [GlobalSetup] public void Setup() { this.nonVectorRunner = new ConversionRunner(this.Count); diff --git a/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertToRgba32.cs b/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertToRgba32.cs index 0c9a8af3fd..88f607789f 100644 --- a/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertToRgba32.cs +++ b/tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertToRgba32.cs @@ -111,7 +111,7 @@ namespace ImageSharp.Benchmarks.General [Params(128)] public int Count { get; set; } - [Setup] + [GlobalSetup] public void Setup() { this.compatibleMemoryLayoutRunner = new ConversionRunner(this.Count);