Browse Source

Sort properties to match other methods

Former-commit-id: 324600bc34112a33bbc9098bc17d1881891ad662
Former-commit-id: d772829a36fcc56cd70c8aca3bc65117518f8ff1
Former-commit-id: fb1f274592d46f295e049555b80a4376765a9ba3
af/merge-core
James Jackson-South 10 years ago
parent
commit
f7db92dd0c
  1. 2
      src/ImageProcessorCore/Filters/Binarization/Threshold.cs
  2. 2
      src/ImageProcessorCore/Filters/ColorMatrix/Hue.cs
  3. 2
      src/ImageProcessorCore/Filters/ColorMatrix/Saturation.cs
  4. 2
      src/ImageProcessorCore/Filters/Convolution/BoxBlur.cs
  5. 2
      src/ImageProcessorCore/Filters/Convolution/EdgeDetection/EdgeDetector2DFilter.cs
  6. 2
      src/ImageProcessorCore/Filters/Convolution/EdgeDetection/EdgeDetectorFilter.cs
  7. 2
      src/ImageProcessorCore/Filters/Convolution/GuassianBlur.cs
  8. 2
      src/ImageProcessorCore/Filters/Convolution/GuassianSharpen.cs
  9. 16
      src/ImageProcessorCore/ParallelImageProcessor.cs
  10. 1
      src/ImageProcessorCore/Samplers/Options/ResizeOptions.cs
  11. 2
      src/ImageProcessorCore/Samplers/Processors/EntropyCrop.cs
  12. 2
      src/ImageProcessorCore/Samplers/Processors/Resize.cs
  13. 2
      src/ImageProcessorCore/Samplers/Processors/Rotate.cs
  14. 2
      src/ImageProcessorCore/Samplers/Processors/Skew.cs
  15. 2
      tests/ImageProcessorCore.Benchmarks/Samplers/Crop.cs
  16. 2
      tests/ImageProcessorCore.Benchmarks/Samplers/Resize.cs
  17. 2
      tests/ImageProcessorCore.Tests/Processors/Samplers/SamplerTests.cs

2
src/ImageProcessorCore/Filters/Binarization/Threshold.cs

@ -45,7 +45,7 @@ namespace ImageProcessorCore.Filters
public Color LowerColor => Color.Black;
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
new GreyscaleBt709().Apply(source, source, sourceRectangle);
}

2
src/ImageProcessorCore/Filters/ColorMatrix/Hue.cs

@ -40,7 +40,7 @@
public override bool Compand => false;
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
float radians = (float)ImageMaths.DegreesToRadians(this.Angle);
double cosradians = Math.Cos(radians);

2
src/ImageProcessorCore/Filters/ColorMatrix/Saturation.cs

@ -40,7 +40,7 @@ namespace ImageProcessorCore.Filters
public override Matrix4x4 Matrix => this.matrix;
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
float saturationFactor = this.saturation / 100f;

2
src/ImageProcessorCore/Filters/Convolution/BoxBlur.cs

@ -46,7 +46,7 @@ namespace ImageProcessorCore.Filters
public override int Parallelism => 1;
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
if (this.kernelY == null)
{

2
src/ImageProcessorCore/Filters/Convolution/EdgeDetection/EdgeDetector2DFilter.cs

@ -15,7 +15,7 @@ namespace ImageProcessorCore.Filters
public bool Greyscale { get; set; }
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
if (this.Greyscale)
{

2
src/ImageProcessorCore/Filters/Convolution/EdgeDetection/EdgeDetectorFilter.cs

@ -15,7 +15,7 @@ namespace ImageProcessorCore.Filters
public bool Greyscale { get; set; }
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
if (this.Greyscale)
{

2
src/ImageProcessorCore/Filters/Convolution/GuassianBlur.cs

@ -80,7 +80,7 @@ namespace ImageProcessorCore.Filters
public override int Parallelism => 1;
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
if (this.kernelY == null)
{

2
src/ImageProcessorCore/Filters/Convolution/GuassianSharpen.cs

@ -82,7 +82,7 @@ namespace ImageProcessorCore.Filters
public override int Parallelism => 1;
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
if (this.kernelY == null)
{

16
src/ImageProcessorCore/ParallelImageProcessor.cs

@ -37,7 +37,7 @@ namespace ImageProcessorCore
{
try
{
this.OnApply(source, target, target.Bounds, sourceRectangle);
this.OnApply(target, source, target.Bounds, sourceRectangle);
this.numRowsProcessed = 0;
this.totalRows = sourceRectangle.Height;
@ -71,7 +71,7 @@ namespace ImageProcessorCore
this.Apply(target, source, target.Bounds, sourceRectangle, sourceRectangle.Y, sourceRectangle.Bottom);
}
this.AfterApply(source, target, target.Bounds, sourceRectangle);
this.AfterApply(target, source, target.Bounds, sourceRectangle);
}
catch (Exception ex)
{
@ -98,7 +98,7 @@ namespace ImageProcessorCore
targetRectangle = target.Bounds;
}
this.OnApply(source, target, targetRectangle, sourceRectangle);
this.OnApply(target, source, targetRectangle, sourceRectangle);
this.numRowsProcessed = 0;
this.totalRows = targetRectangle.Bottom;
@ -129,7 +129,7 @@ namespace ImageProcessorCore
this.Apply(target, source, targetRectangle, sourceRectangle, targetRectangle.Y, targetRectangle.Bottom);
}
this.AfterApply(source, target, target.Bounds, sourceRectangle);
this.AfterApply(target, source, target.Bounds, sourceRectangle);
}
catch (Exception ex)
{
@ -140,8 +140,8 @@ namespace ImageProcessorCore
/// <summary>
/// This method is called before the process is applied to prepare the processor.
/// </summary>
/// <param name="source">The source image. Cannot be null.</param>
/// <param name="target">Target image to apply the process to.</param>
/// <param name="source">The source image. Cannot be null.</param>
/// <param name="targetRectangle">
/// The <see cref="Rectangle"/> structure that specifies the location and size of the drawn image.
/// The image is scaled to fit the rectangle.
@ -149,7 +149,7 @@ namespace ImageProcessorCore
/// <param name="sourceRectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to draw.
/// </param>
protected virtual void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected virtual void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
}
@ -177,8 +177,8 @@ namespace ImageProcessorCore
/// <summary>
/// This method is called after the process is applied to prepare the processor.
/// </summary>
/// <param name="source">The source image. Cannot be null.</param>
/// <param name="target">Target image to apply the process to.</param>
/// <param name="source">The source image. Cannot be null.</param>
/// <param name="targetRectangle">
/// The <see cref="Rectangle"/> structure that specifies the location and size of the drawn image.
/// The image is scaled to fit the rectangle.
@ -186,7 +186,7 @@ namespace ImageProcessorCore
/// <param name="sourceRectangle">
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to draw.
/// </param>
protected virtual void AfterApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected virtual void AfterApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
}

1
src/ImageProcessorCore/Samplers/Options/ResizeOptions.cs

@ -5,7 +5,6 @@
namespace ImageProcessorCore
{
using Processors
using System.Collections.Generic;
using System.Linq;

2
src/ImageProcessorCore/Samplers/Processors/EntropyCrop.cs

@ -40,7 +40,7 @@ namespace ImageProcessorCore.Processors
public float Value { get; }
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
using (ImageBase temp = new Image(source.Width, source.Height))
{

2
src/ImageProcessorCore/Samplers/Processors/Resize.cs

@ -32,7 +32,7 @@ namespace ImageProcessorCore.Processors
public override int Parallelism { get; set; } = 1;
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
if (!(this.Sampler is NearestNeighborResampler))
{

2
src/ImageProcessorCore/Samplers/Processors/Rotate.cs

@ -63,7 +63,7 @@ namespace ImageProcessorCore.Processors
public bool Expand { get; set; }
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
// If we are expanding we need to pad the bounds of the source rectangle.
// We can use the resizer in nearest neighbor mode to do this fairly quickly.

2
src/ImageProcessorCore/Samplers/Processors/Skew.cs

@ -94,7 +94,7 @@ namespace ImageProcessorCore.Processors
public bool Expand { get; set; }
/// <inheritdoc/>
protected override void OnApply(ImageBase source, ImageBase target, Rectangle targetRectangle, Rectangle sourceRectangle)
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{
// If we are expanding we need to pad the bounds of the source rectangle.
// We can use the resizer in nearest neighbor mode to do this fairly quickly.

2
tests/ImageProcessorCore.Benchmarks/Samplers/Crop.cs

@ -5,7 +5,7 @@
using BenchmarkDotNet.Attributes;
using ImageProcessorCore.Samplers;
using ImageProcessorCore.Processors;
using CoreImage = ImageProcessorCore.Image;
using CoreSize = ImageProcessorCore.Size;

2
tests/ImageProcessorCore.Benchmarks/Samplers/Resize.cs

@ -5,7 +5,7 @@
using BenchmarkDotNet.Attributes;
using ImageProcessorCore.Samplers;
using ImageProcessorCore.Processors;
using CoreImage = ImageProcessorCore.Image;
using CoreSize = ImageProcessorCore.Size;

2
tests/ImageProcessorCore.Tests/Processors/Samplers/SamplerTests.cs

@ -3,7 +3,7 @@
using System.Diagnostics;
using System.IO;
using ImageProcessorCore.Samplers;
using ImageProcessorCore.Processors;
using Xunit;
using Filters;

Loading…
Cancel
Save