diff --git a/src/ImageSharp/Processing/Processors/Transforms/AffineTransformProcessor.cs b/src/ImageSharp/Processing/Processors/Transforms/AffineTransformProcessor.cs index 849f061669..d0000edcf9 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/AffineTransformProcessor.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/AffineTransformProcessor.cs @@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms Guard.NotNull(sampler, nameof(sampler)); this.Sampler = sampler; this.TransformMatrix = matrix; - this.TargetDimensions = targetDimensions; + this.DestinationSize = targetDimensions; } /// @@ -35,9 +35,9 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms public Matrix3x2 TransformMatrix { get; } /// - /// Gets the target dimensions to constrain the transformed image to. + /// Gets the destination size to constrain the transformed image to. /// - public Size TargetDimensions { get; } + public Size DestinationSize { get; } /// public override ICloningImageProcessor CreatePixelSpecificCloningProcessor(Configuration configuration, Image source, Rectangle sourceRectangle) diff --git a/src/ImageSharp/Processing/Processors/Transforms/AffineTransformProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Transforms/AffineTransformProcessor{TPixel}.cs index 9d01c049c2..dddeba33fa 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/AffineTransformProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/AffineTransformProcessor{TPixel}.cs @@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms internal class AffineTransformProcessor : TransformProcessor where TPixel : struct, IPixel { - private readonly Size targetSize; + private readonly Size destinationSize; private readonly Matrix3x2 transformMatrix; private readonly IResampler resampler; @@ -27,12 +27,12 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms public AffineTransformProcessor(Configuration configuration, AffineTransformProcessor definition, Image source, Rectangle sourceRectangle) : base(configuration, source, sourceRectangle) { - this.targetSize = definition.TargetDimensions; + this.destinationSize = definition.DestinationSize; this.transformMatrix = definition.TransformMatrix; this.resampler = definition.Sampler; } - protected override Size GetDestinationSize() => this.targetSize; + protected override Size GetDestinationSize() => this.destinationSize; /// protected override void OnFrameApply(ImageFrame source, ImageFrame destination) diff --git a/src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor.cs b/src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor.cs index d8a9c3ed96..6f17c11450 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor.cs @@ -21,7 +21,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms Guard.NotNull(sampler, nameof(sampler)); this.Sampler = sampler; this.TransformMatrix = matrix; - this.TargetDimensions = targetDimensions; + this.DestinationSize = targetDimensions; } /// @@ -35,9 +35,9 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms public Matrix4x4 TransformMatrix { get; } /// - /// Gets the target dimensions to constrain the transformed image to. + /// Gets the destination size to constrain the transformed image to. /// - public Size TargetDimensions { get; } + public Size DestinationSize { get; } /// public override ICloningImageProcessor CreatePixelSpecificCloningProcessor(Configuration configuration, Image source, Rectangle sourceRectangle) diff --git a/src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor{TPixel}.cs index afc4658b44..6ab1e1358d 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/ProjectiveTransformProcessor{TPixel}.cs @@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms internal class ProjectiveTransformProcessor : TransformProcessor where TPixel : struct, IPixel { - private readonly Size targetSize; + private readonly Size destinationSize; private readonly IResampler resampler; private readonly Matrix4x4 transformMatrix; @@ -27,12 +27,12 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms public ProjectiveTransformProcessor(Configuration configuration, ProjectiveTransformProcessor definition, Image source, Rectangle sourceRectangle) : base(configuration, source, sourceRectangle) { - this.targetSize = definition.TargetDimensions; + this.destinationSize = definition.DestinationSize; this.transformMatrix = definition.TransformMatrix; this.resampler = definition.Sampler; } - protected override Size GetDestinationSize() => this.targetSize; + protected override Size GetDestinationSize() => this.destinationSize; /// protected override void OnFrameApply(ImageFrame source, ImageFrame destination) diff --git a/src/ImageSharp/Processing/Processors/Transforms/ResamplerExtensions.Operations.cs b/src/ImageSharp/Processing/Processors/Transforms/ResamplerExtensions.Operations.cs index 96fcc49f7b..ec2aef9c50 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/ResamplerExtensions.Operations.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/ResamplerExtensions.Operations.cs @@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms { this.source = source; this.destination = destination; - this.bounds = destination.Bounds(); + this.bounds = source.Bounds(); this.matrix = matrix; this.maxX = destination.Width; } @@ -77,7 +77,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms { this.source = source; this.destination = destination; - this.bounds = destination.Bounds(); + this.bounds = source.Bounds(); this.matrix = matrix; this.maxX = destination.Width; } diff --git a/tests/Images/External b/tests/Images/External index f9b4bfe42c..f8a76fd3a9 160000 --- a/tests/Images/External +++ b/tests/Images/External @@ -1 +1 @@ -Subproject commit f9b4bfe42cacb3eefab02ada92ac771a9b93c080 +Subproject commit f8a76fd3a900b90c98df67ac896574383a4d09f3