Browse Source

fix warnings

af/merge-core
Scott Williams 9 years ago
parent
commit
4676cb794d
  1. 1
      samples/AvatarWithRoundedCorner/Program.cs
  2. 3
      src/ImageSharp/Processing/Binarization/Dither.cs
  3. 1
      src/ImageSharp/Processing/Convolution/BoxBlur.cs
  4. 1
      src/ImageSharp/Processing/Convolution/DetectEdges.cs
  5. 2
      src/ImageSharp/Processing/Convolution/GaussianBlur.cs
  6. 1
      src/ImageSharp/Processing/Convolution/GaussianSharpen.cs
  7. 1
      src/ImageSharp/Processing/Delegate.cs
  8. 1
      src/ImageSharp/Processing/Effects/Pixelate.cs
  9. 2
      tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertFromRgba32.cs
  10. 2
      tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertFromVector4.cs
  11. 2
      tests/ImageSharp.Benchmarks/General/PixelConversion_ConvertToRgba32.cs

1
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;

3
src/ImageSharp/Processing/Binarization/Dither.cs

@ -23,7 +23,6 @@ namespace ImageSharp
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="dither">The ordered ditherer.</param>
/// <param name="index">The component index to test the threshold against. Must range from 0 to 3.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageOperations<TPixel> Dither<TPixel>(this IImageOperations<TPixel> source, IOrderedDither dither)
where TPixel : struct, IPixel<TPixel>
@ -31,6 +30,7 @@ namespace ImageSharp
source.ApplyProcessor(new OrderedDitherProcessor<TPixel>(dither, 0));
return source;
}
/// <summary>
/// Dithers the image reducing it to two colors using ordered dithering.
/// </summary>
@ -55,7 +55,6 @@ namespace ImageSharp
/// <param name="rectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
/// </param>
/// <param name="index">The component index to test the threshold against. Must range from 0 to 3.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageOperations<TPixel> Dither<TPixel>(this IImageOperations<TPixel> source, IOrderedDither dither, Rectangle rectangle)
where TPixel : struct, IPixel<TPixel>

1
src/ImageSharp/Processing/Convolution/BoxBlur.cs

@ -22,7 +22,6 @@ namespace ImageSharp
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="radius">The 'radius' value representing the size of the area to sample.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageOperations<TPixel> BoxBlur<TPixel>(this IImageOperations<TPixel> source)
where TPixel : struct, IPixel<TPixel>

1
src/ImageSharp/Processing/Convolution/DetectEdges.cs

@ -53,7 +53,6 @@ namespace ImageSharp
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="filter">The filter for detecting edges.</param>
/// <param name="grayscale">Whether to convert the image to Grayscale first. Defaults to true.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageOperations<TPixel> DetectEdges<TPixel>(this IImageOperations<TPixel> source, EdgeDetection filter)
where TPixel : struct, IPixel<TPixel>

2
src/ImageSharp/Processing/Convolution/GaussianBlur.cs

@ -23,11 +23,11 @@ namespace ImageSharp
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="sigma">The 'sigma' value representing the weight of the blur.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageOperations<TPixel> GaussianBlur<TPixel>(this IImageOperations<TPixel> source)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new GaussianBlurProcessor<TPixel>(3f));
/// <summary>
/// Applies a Gaussian blur to the image.
/// </summary>

1
src/ImageSharp/Processing/Convolution/GaussianSharpen.cs

@ -23,7 +23,6 @@ namespace ImageSharp
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="sigma">The 'sigma' value representing the weight of the blur.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageOperations<TPixel> GaussianSharpen<TPixel>(this IImageOperations<TPixel> source)
where TPixel : struct, IPixel<TPixel>

1
src/ImageSharp/Processing/Delegate.cs

@ -26,6 +26,5 @@ namespace ImageSharp
public static IImageOperations<TPixel> Run<TPixel>(this IImageOperations<TPixel> source, Action<Image<TPixel>> operation)
where TPixel : struct, IPixel<TPixel>
=> source.ApplyProcessor(new DelegateProcessor<TPixel>(operation));
}
}

1
src/ImageSharp/Processing/Effects/Pixelate.cs

@ -22,7 +22,6 @@ namespace ImageSharp
/// </summary>
/// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="source">The image this method extends.</param>
/// <param name="size">The size of the pixels.</param>
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
public static IImageOperations<TPixel> Pixelate<TPixel>(this IImageOperations<TPixel> source)
where TPixel : struct, IPixel<TPixel>

2
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<TestRgba>(this.Count);

2
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<TestArgb>(this.Count);

2
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<TestRgba>(this.Count);

Loading…
Cancel
Save