Browse Source

Update ProjectiveTransformProcessor{TPixel}.cs

af/octree-no-pixelmap
James Jackson-South 6 years ago
parent
commit
efcd3d8913
  1. 6
      src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor{TPixel}.cs

6
src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor{TPixel}.cs

@ -59,23 +59,21 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
if (this.resampler is NearestNeighborResampler)
{
Rectangle sourceBounds = this.SourceRectangle;
var nearestRowAction = new NearestNeighborRowIntervalAction(ref sourceBounds, ref matrix, width, source, destination);
ParallelRowIterator.IterateRows(
targetBounds,
configuration,
in nearestRowAction);
new NearestNeighborRowIntervalAction(ref sourceBounds, ref matrix, width, source, destination));
return;
}
using var kernelMap = new TransformKernelMap(configuration, source.Size(), destination.Size(), this.resampler);
var rowAction = new RowIntervalAction(configuration, kernelMap, ref matrix, width, source, destination);
ParallelRowIterator.IterateRows<RowIntervalAction, Vector4>(
targetBounds,
configuration,
in rowAction);
new RowIntervalAction(configuration, kernelMap, ref matrix, width, source, destination));
}
private readonly struct NearestNeighborRowIntervalAction : IRowIntervalAction

Loading…
Cancel
Save