Browse Source

Remove task splitting code.

Former-commit-id: a29d6e26e80dd4c47adfe6dab3cea8b41699165e
Former-commit-id: 5463d0ceda62e577377de3ad9d52d347a830622b
Former-commit-id: b3efff43e573ba7239d5724187cea5ae62f93690
af/merge-core
James Jackson-South 10 years ago
parent
commit
a11d0177e9
  1. 2
      src/ImageProcessorCore/Filters/Processors/AlphaProcessor.cs
  2. 2
      src/ImageProcessorCore/Filters/Processors/BackgroundColorProcessor.cs
  3. 2
      src/ImageProcessorCore/Filters/Processors/Binarization/ThresholdProcessor.cs
  4. 2
      src/ImageProcessorCore/Filters/Processors/BlendProcessor.cs
  5. 2
      src/ImageProcessorCore/Filters/Processors/BrightnessProcessor.cs
  6. 15
      src/ImageProcessorCore/Filters/Processors/ColorMatrix/ColorMatrixFilter.cs
  7. 2
      src/ImageProcessorCore/Filters/Processors/ContrastProcessor.cs
  8. 3
      src/ImageProcessorCore/Filters/Processors/Convolution/BoxBlurProcessor.cs
  9. 2
      src/ImageProcessorCore/Filters/Processors/Convolution/Convolution2DFilter.cs
  10. 43
      src/ImageProcessorCore/Filters/Processors/Convolution/Convolution2PassFilter.cs
  11. 2
      src/ImageProcessorCore/Filters/Processors/Convolution/ConvolutionFilter.cs
  12. 3
      src/ImageProcessorCore/Filters/Processors/Convolution/GuassianBlurProcessor.cs
  13. 3
      src/ImageProcessorCore/Filters/Processors/Convolution/GuassianSharpenProcessor.cs
  14. 2
      src/ImageProcessorCore/Filters/Processors/GlowProcessor.cs
  15. 2
      src/ImageProcessorCore/Filters/Processors/InvertProcessor.cs
  16. 7
      src/ImageProcessorCore/Filters/Processors/PixelateProcessor.cs
  17. 2
      src/ImageProcessorCore/Filters/Processors/VignetteProcessor.cs
  18. 70
      src/ImageProcessorCore/ImageProcessor.cs
  19. 13
      src/ImageProcessorCore/Samplers/Processors/CropProcessor.cs
  20. 2
      src/ImageProcessorCore/Samplers/Processors/ImageSampler.cs
  21. 11
      src/ImageProcessorCore/Samplers/Processors/ResizeProcessor.cs
  22. 3
      src/ImageProcessorCore/Samplers/Processors/RotateFlipProcessor.cs
  23. 3
      src/ImageProcessorCore/Samplers/Processors/RotateProcessor.cs
  24. 3
      src/ImageProcessorCore/Samplers/Processors/SkewProcessor.cs

2
src/ImageProcessorCore/Filters/Processors/AlphaProcessor.cs

@ -12,7 +12,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// An <see cref="IImageProcessor"/> to change the Alpha of an <see cref="Image"/>. /// An <see cref="IImageProcessor"/> to change the Alpha of an <see cref="Image"/>.
/// </summary> /// </summary>
public class AlphaProcessor : ParallelImageProcessor public class AlphaProcessor : ImageProcessor
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="AlphaProcessor"/> class. /// Initializes a new instance of the <see cref="AlphaProcessor"/> class.

2
src/ImageProcessorCore/Filters/Processors/BackgroundColorProcessor.cs

@ -11,7 +11,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// Sets the background color of the image. /// Sets the background color of the image.
/// </summary> /// </summary>
public class BackgroundColorProcessor : ParallelImageProcessor public class BackgroundColorProcessor : ImageProcessor
{ {
/// <summary> /// <summary>
/// The epsilon for comparing floating point numbers. /// The epsilon for comparing floating point numbers.

2
src/ImageProcessorCore/Filters/Processors/Binarization/ThresholdProcessor.cs

@ -13,7 +13,7 @@ namespace ImageProcessorCore.Processors
/// <see cref="Image"/>. The image will be converted to greyscale before thresholding /// <see cref="Image"/>. The image will be converted to greyscale before thresholding
/// occurs. /// occurs.
/// </summary> /// </summary>
public class ThresholdProcessor : ParallelImageProcessor public class ThresholdProcessor : ImageProcessor
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ThresholdProcessor"/> class. /// Initializes a new instance of the <see cref="ThresholdProcessor"/> class.

2
src/ImageProcessorCore/Filters/Processors/BlendProcessor.cs

@ -10,7 +10,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// Combines two images together by blending the pixels. /// Combines two images together by blending the pixels.
/// </summary> /// </summary>
public class BlendProcessor : ParallelImageProcessor public class BlendProcessor : ImageProcessor
{ {
/// <summary> /// <summary>
/// The image to blend. /// The image to blend.

2
src/ImageProcessorCore/Filters/Processors/BrightnessProcessor.cs

@ -12,7 +12,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// An <see cref="IImageProcessor"/> to change the brightness of an <see cref="Image"/>. /// An <see cref="IImageProcessor"/> to change the brightness of an <see cref="Image"/>.
/// </summary> /// </summary>
public class BrightnessProcessor : ParallelImageProcessor public class BrightnessProcessor : ImageProcessor
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="BrightnessProcessor"/> class. /// Initializes a new instance of the <see cref="BrightnessProcessor"/> class.

15
src/ImageProcessorCore/Filters/Processors/ColorMatrix/ColorMatrixFilter.cs

@ -11,7 +11,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// The color matrix filter. /// The color matrix filter.
/// </summary> /// </summary>
public abstract class ColorMatrixFilter : ParallelImageProcessor, IColorMatrixFilter public abstract class ColorMatrixFilter : ImageProcessor, IColorMatrixFilter
{ {
/// <inheritdoc/> /// <inheritdoc/>
public abstract Matrix4x4 Matrix { get; } public abstract Matrix4x4 Matrix { get; }
@ -22,8 +22,6 @@ namespace ImageProcessorCore.Processors
/// <inheritdoc/> /// <inheritdoc/>
protected override void Apply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY) protected override void Apply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY)
{ {
int sourceY = sourceRectangle.Y;
int sourceBottom = sourceRectangle.Bottom;
int startX = sourceRectangle.X; int startX = sourceRectangle.X;
int endX = sourceRectangle.Right; int endX = sourceRectangle.Right;
Matrix4x4 matrix = this.Matrix; Matrix4x4 matrix = this.Matrix;
@ -36,15 +34,12 @@ namespace ImageProcessorCore.Processors
endY, endY,
y => y =>
{ {
if (y >= sourceY && y < sourceBottom) for (int x = startX; x < endX; x++)
{ {
for (int x = startX; x < endX; x++) targetPixels[x, y] = this.ApplyMatrix(sourcePixels[x, y], matrix);
{
targetPixels[x, y] = this.ApplyMatrix(sourcePixels[x, y], matrix);
}
this.OnRowProcessed();
} }
this.OnRowProcessed();
}); });
} }
} }

2
src/ImageProcessorCore/Filters/Processors/ContrastProcessor.cs

@ -12,7 +12,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// An <see cref="IImageProcessor"/> to change the contrast of an <see cref="Image"/>. /// An <see cref="IImageProcessor"/> to change the contrast of an <see cref="Image"/>.
/// </summary> /// </summary>
public class ContrastProcessor : ParallelImageProcessor public class ContrastProcessor : ImageProcessor
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ContrastProcessor"/> class. /// Initializes a new instance of the <see cref="ContrastProcessor"/> class.

3
src/ImageProcessorCore/Filters/Processors/Convolution/BoxBlurProcessor.cs

@ -42,9 +42,6 @@ namespace ImageProcessorCore.Processors
/// <inheritdoc/> /// <inheritdoc/>
public override float[,] KernelY => this.kernelY; public override float[,] KernelY => this.kernelY;
/// <inheritdoc/>
public override int Parallelism => 1;
/// <inheritdoc/> /// <inheritdoc/>
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle) protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{ {

2
src/ImageProcessorCore/Filters/Processors/Convolution/Convolution2DFilter.cs

@ -11,7 +11,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// Defines a filter that uses two one-dimensional matrices to perform convolution against an image. /// Defines a filter that uses two one-dimensional matrices to perform convolution against an image.
/// </summary> /// </summary>
public abstract class Convolution2DFilter : ParallelImageProcessor public abstract class Convolution2DFilter : ImageProcessor
{ {
/// <summary> /// <summary>
/// Gets the horizontal gradient operator. /// Gets the horizontal gradient operator.

43
src/ImageProcessorCore/Filters/Processors/Convolution/Convolution2PassFilter.cs

@ -10,7 +10,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// Defines a filter that uses two one-dimensional matrices to perform two-pass convolution against an image. /// Defines a filter that uses two one-dimensional matrices to perform two-pass convolution against an image.
/// </summary> /// </summary>
public abstract class Convolution2PassFilter : ParallelImageProcessor public abstract class Convolution2PassFilter : ImageProcessor
{ {
/// <summary> /// <summary>
/// Gets the horizontal gradient operator. /// Gets the horizontal gradient operator.
@ -64,7 +64,6 @@ namespace ImageProcessorCore.Processors
int radiusY = kernelHeight >> 1; int radiusY = kernelHeight >> 1;
int radiusX = kernelWidth >> 1; int radiusX = kernelWidth >> 1;
int sourceY = sourceRectangle.Y;
int sourceBottom = sourceRectangle.Bottom; int sourceBottom = sourceRectangle.Bottom;
int startX = sourceRectangle.X; int startX = sourceRectangle.X;
int endX = sourceRectangle.Right; int endX = sourceRectangle.Right;
@ -79,36 +78,34 @@ namespace ImageProcessorCore.Processors
endY, endY,
y => y =>
{ {
if (y >= sourceY && y < sourceBottom) for (int x = startX; x < endX; x++)
{ {
for (int x = startX; x < endX; x++) Color destination = new Color();
{
Color destination = new Color();
// Apply each matrix multiplier to the color components for each pixel. // Apply each matrix multiplier to the color components for each pixel.
for (int fy = 0; fy < kernelHeight; fy++) for (int fy = 0; fy < kernelHeight; fy++)
{ {
int fyr = fy - radiusY; int fyr = fy - radiusY;
int offsetY = y + fyr; int offsetY = y + fyr;
offsetY = offsetY.Clamp(0, maxY); offsetY = offsetY.Clamp(0, maxY);
for (int fx = 0; fx < kernelWidth; fx++) for (int fx = 0; fx < kernelWidth; fx++)
{ {
int fxr = fx - radiusX; int fxr = fx - radiusX;
int offsetX = x + fxr; int offsetX = x + fxr;
offsetX = offsetX.Clamp(0, maxX); offsetX = offsetX.Clamp(0, maxX);
Color currentColor = sourcePixels[offsetX, offsetY]; Color currentColor = sourcePixels[offsetX, offsetY];
destination += kernel[fy, fx] * currentColor; destination += kernel[fy, fx] * currentColor;
}
} }
targetPixels[x, y] = destination;
} }
this.OnRowProcessed();
targetPixels[x, y] = destination;
} }
this.OnRowProcessed();
}); });
} }
} }

2
src/ImageProcessorCore/Filters/Processors/Convolution/ConvolutionFilter.cs

@ -10,7 +10,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// Defines a filter that uses a 2 dimensional matrix to perform convolution against an image. /// Defines a filter that uses a 2 dimensional matrix to perform convolution against an image.
/// </summary> /// </summary>
public abstract class ConvolutionFilter : ParallelImageProcessor public abstract class ConvolutionFilter : ImageProcessor
{ {
/// <summary> /// <summary>
/// Gets the 2d gradient operator. /// Gets the 2d gradient operator.

3
src/ImageProcessorCore/Filters/Processors/Convolution/GuassianBlurProcessor.cs

@ -76,9 +76,6 @@ namespace ImageProcessorCore.Processors
/// <inheritdoc/> /// <inheritdoc/>
public override float[,] KernelY => this.kernelY; public override float[,] KernelY => this.kernelY;
/// <inheritdoc/>
public override int Parallelism => 1;
/// <inheritdoc/> /// <inheritdoc/>
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle) protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{ {

3
src/ImageProcessorCore/Filters/Processors/Convolution/GuassianSharpenProcessor.cs

@ -78,9 +78,6 @@ namespace ImageProcessorCore.Processors
/// <inheritdoc/> /// <inheritdoc/>
public override float[,] KernelY => this.kernelY; public override float[,] KernelY => this.kernelY;
/// <inheritdoc/>
public override int Parallelism => 1;
/// <inheritdoc/> /// <inheritdoc/>
protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle) protected override void OnApply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle)
{ {

2
src/ImageProcessorCore/Filters/Processors/GlowProcessor.cs

@ -12,7 +12,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// Creates a glow effect on the image /// Creates a glow effect on the image
/// </summary> /// </summary>
public class GlowProcessor : ParallelImageProcessor public class GlowProcessor : ImageProcessor
{ {
/// <summary> /// <summary>
/// Gets or sets the glow color to apply. /// Gets or sets the glow color to apply.

2
src/ImageProcessorCore/Filters/Processors/InvertProcessor.cs

@ -11,7 +11,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// An <see cref="IImageProcessor"/> to invert the colors of an <see cref="Image"/>. /// An <see cref="IImageProcessor"/> to invert the colors of an <see cref="Image"/>.
/// </summary> /// </summary>
public class InvertProcessor : ParallelImageProcessor public class InvertProcessor : ImageProcessor
{ {
/// <inheritdoc/> /// <inheritdoc/>
protected override void Apply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY) protected override void Apply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY)

7
src/ImageProcessorCore/Filters/Processors/PixelateProcessor.cs

@ -12,7 +12,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// An <see cref="IImageProcessor"/> to invert the colors of an <see cref="Image"/>. /// An <see cref="IImageProcessor"/> to invert the colors of an <see cref="Image"/>.
/// </summary> /// </summary>
public class PixelateProcessor : ParallelImageProcessor public class PixelateProcessor : ImageProcessor
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="PixelateProcessor"/> class. /// Initializes a new instance of the <see cref="PixelateProcessor"/> class.
@ -27,9 +27,6 @@ namespace ImageProcessorCore.Processors
this.Value = size; this.Value = size;
} }
/// <inheritdoc/>
public override int Parallelism { get; set; } = 1;
/// <summary> /// <summary>
/// Gets or the pixel size. /// Gets or the pixel size.
/// </summary> /// </summary>
@ -59,7 +56,6 @@ namespace ImageProcessorCore.Processors
{ {
for (int x = startX; x < endX; x += size) for (int x = startX; x < endX; x += size)
{ {
int offsetX = offset; int offsetX = offset;
int offsetY = offset; int offsetY = offset;
@ -88,6 +84,7 @@ namespace ImageProcessorCore.Processors
} }
} }
} }
this.OnRowProcessed(); this.OnRowProcessed();
} }
}); });

2
src/ImageProcessorCore/Filters/Processors/VignetteProcessor.cs

@ -12,7 +12,7 @@ namespace ImageProcessorCore.Processors
/// <summary> /// <summary>
/// Creates a vignette effect on the image /// Creates a vignette effect on the image
/// </summary> /// </summary>
public class VignetteProcessor : ParallelImageProcessor public class VignetteProcessor : ImageProcessor
{ {
/// <summary> /// <summary>
/// Gets or sets the vignette color to apply. /// Gets or sets the vignette color to apply.

70
src/ImageProcessorCore/ParallelImageProcessor.cs → src/ImageProcessorCore/ImageProcessor.cs

@ -1,4 +1,4 @@
// <copyright file="ParallelImageProcessor.cs" company="James Jackson-South"> // <copyright file="ImageProcessor.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors. // Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
// </copyright> // </copyright>
@ -7,21 +7,15 @@ namespace ImageProcessorCore.Processors
{ {
using System; using System;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
/// <summary> /// <summary>
/// Allows the application of processors using parallel processing. /// Allows the application of processors to images.
/// </summary> /// </summary>
public abstract class ParallelImageProcessor : IImageProcessor public abstract class ImageProcessor : IImageProcessor
{ {
/// <inheritdoc/> /// <inheritdoc/>
public event ProgressEventHandler OnProgress; public event ProgressEventHandler OnProgress;
/// <summary>
/// Gets or sets the count of workers to run the process in parallel.
/// </summary>
public virtual int Parallelism { get; set; } = Environment.ProcessorCount * 2;
/// <summary> /// <summary>
/// The number of rows processed by a derived class. /// The number of rows processed by a derived class.
/// </summary> /// </summary>
@ -42,34 +36,7 @@ namespace ImageProcessorCore.Processors
this.numRowsProcessed = 0; this.numRowsProcessed = 0;
this.totalRows = sourceRectangle.Height; this.totalRows = sourceRectangle.Height;
if (this.Parallelism > 1) this.Apply(target, source, target.Bounds, sourceRectangle, sourceRectangle.Y, sourceRectangle.Bottom);
{
int partitionCount = this.Parallelism;
Task[] tasks = new Task[partitionCount];
for (int p = 0; p < partitionCount; p++)
{
int current = p;
tasks[p] = Task.Run(
() =>
{
int batchSize = sourceRectangle.Height / partitionCount;
int yStart = sourceRectangle.Y + (current * batchSize);
int yEnd = current == partitionCount - 1
? sourceRectangle.Bottom
: yStart + batchSize;
this.Apply(target, source, target.Bounds, sourceRectangle, yStart, yEnd);
});
}
Task.WaitAll(tasks);
}
else
{
this.Apply(target, source, target.Bounds, sourceRectangle, sourceRectangle.Y, sourceRectangle.Bottom);
}
this.AfterApply(target, source, target.Bounds, sourceRectangle); this.AfterApply(target, source, target.Bounds, sourceRectangle);
} }
@ -88,6 +55,7 @@ namespace ImageProcessorCore.Processors
float[] pixels = new float[width * height * 4]; float[] pixels = new float[width * height * 4];
target.SetPixels(width, height, pixels); target.SetPixels(width, height, pixels);
// Ensure we always have bounds.
if (sourceRectangle == Rectangle.Empty) if (sourceRectangle == Rectangle.Empty)
{ {
sourceRectangle = source.Bounds; sourceRectangle = source.Bounds;
@ -101,33 +69,9 @@ namespace ImageProcessorCore.Processors
this.OnApply(target, source, targetRectangle, sourceRectangle); this.OnApply(target, source, targetRectangle, sourceRectangle);
this.numRowsProcessed = 0; this.numRowsProcessed = 0;
this.totalRows = targetRectangle.Bottom; this.totalRows = targetRectangle.Height;
if (this.Parallelism > 1) this.Apply(target, source, targetRectangle, sourceRectangle, targetRectangle.Y, targetRectangle.Bottom);
{
int partitionCount = this.Parallelism;
Task[] tasks = new Task[partitionCount];
for (int p = 0; p < partitionCount; p++)
{
int current = p;
tasks[p] = Task.Run(() =>
{
int batchSize = targetRectangle.Bottom / partitionCount;
int yStart = current * batchSize;
int yEnd = current == partitionCount - 1 ? targetRectangle.Bottom : yStart + batchSize;
this.Apply(target, source, targetRectangle, sourceRectangle, yStart, yEnd);
});
}
Task.WaitAll(tasks);
}
else
{
this.Apply(target, source, targetRectangle, sourceRectangle, targetRectangle.Y, targetRectangle.Bottom);
}
this.AfterApply(target, source, target.Bounds, sourceRectangle); this.AfterApply(target, source, target.Bounds, sourceRectangle);
} }

13
src/ImageProcessorCore/Samplers/Processors/CropProcessor.cs

@ -15,8 +15,6 @@ namespace ImageProcessorCore.Processors
/// <inheritdoc/> /// <inheritdoc/>
protected override void Apply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY) protected override void Apply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY)
{ {
int targetY = targetRectangle.Y;
int targetBottom = targetRectangle.Bottom;
int startX = targetRectangle.X; int startX = targetRectangle.X;
int endX = targetRectangle.Right; int endX = targetRectangle.Right;
int sourceX = sourceRectangle.X; int sourceX = sourceRectangle.X;
@ -30,15 +28,12 @@ namespace ImageProcessorCore.Processors
endY, endY,
y => y =>
{ {
if (y >= targetY && y < targetBottom) for (int x = startX; x < endX; x++)
{ {
for (int x = startX; x < endX; x++) targetPixels[x, y] = sourcePixels[x + sourceX, y + sourceY];
{
targetPixels[x, y] = sourcePixels[x + sourceX, y + sourceY];
}
this.OnRowProcessed();
} }
this.OnRowProcessed();
}); });
} }
} }

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

@ -9,7 +9,7 @@ namespace ImageProcessorCore.Processors
/// Applies sampling methods to an image. /// Applies sampling methods to an image.
/// All processors requiring resampling or resizing should inherit from this. /// All processors requiring resampling or resizing should inherit from this.
/// </summary> /// </summary>
public abstract class ImageSampler : ParallelImageProcessor, IImageSampler public abstract class ImageSampler : ImageProcessor, IImageSampler
{ {
/// <inheritdoc/> /// <inheritdoc/>
public virtual bool Compand { get; set; } = false; public virtual bool Compand { get; set; } = false;

11
src/ImageProcessorCore/Samplers/Processors/ResizeProcessor.cs

@ -31,9 +31,6 @@ namespace ImageProcessorCore.Processors
this.Sampler = sampler; this.Sampler = sampler;
} }
/// <inheritdoc/>
public override int Parallelism { get; set; } = 1;
/// <summary> /// <summary>
/// Gets the sampler to perform the resize operation. /// Gets the sampler to perform the resize operation.
/// </summary> /// </summary>
@ -62,13 +59,7 @@ namespace ImageProcessorCore.Processors
} }
/// <inheritdoc/> /// <inheritdoc/>
protected override void Apply( protected override void Apply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY)
ImageBase target,
ImageBase source,
Rectangle targetRectangle,
Rectangle sourceRectangle,
int startY,
int endY)
{ {
// Jump out, we'll deal with that later. // Jump out, we'll deal with that later.
if (source.Bounds == target.Bounds && sourceRectangle == targetRectangle) if (source.Bounds == target.Bounds && sourceRectangle == targetRectangle)

3
src/ImageProcessorCore/Samplers/Processors/RotateFlipProcessor.cs

@ -34,9 +34,6 @@ namespace ImageProcessorCore.Processors
/// </summary> /// </summary>
public RotateType RotateType { get; } public RotateType RotateType { get; }
/// <inheritdoc/>
public override int Parallelism { get; set; } = 1;
/// <inheritdoc/> /// <inheritdoc/>
protected override void Apply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY) protected override void Apply(ImageBase target, ImageBase source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY)
{ {

3
src/ImageProcessorCore/Samplers/Processors/RotateProcessor.cs

@ -18,9 +18,6 @@ namespace ImageProcessorCore.Processors
/// </summary> /// </summary>
private Matrix3x2 processMatrix; private Matrix3x2 processMatrix;
/// <inheritdoc/>
public override int Parallelism { get; set; } = 1;
/// <summary> /// <summary>
/// Gets or sets the angle of processMatrix in degrees. /// Gets or sets the angle of processMatrix in degrees.
/// </summary> /// </summary>

3
src/ImageProcessorCore/Samplers/Processors/SkewProcessor.cs

@ -18,9 +18,6 @@ namespace ImageProcessorCore.Processors
/// </summary> /// </summary>
private Matrix3x2 processMatrix; private Matrix3x2 processMatrix;
/// <inheritdoc/>
public override int Parallelism { get; set; } = 1;
/// <summary> /// <summary>
/// Gets or sets the angle of rotation along the x-axis in degrees. /// Gets or sets the angle of rotation along the x-axis in degrees.
/// </summary> /// </summary>

Loading…
Cancel
Save