diff --git a/tests/ImageSharp.Tests/Processing/Processors/Transforms/SwizzleTests.cs b/tests/ImageSharp.Tests/Processing/Processors/Transforms/SwizzleTests.cs index b951a7fb0..4d3b60494 100644 --- a/tests/ImageSharp.Tests/Processing/Processors/Transforms/SwizzleTests.cs +++ b/tests/ImageSharp.Tests/Processing/Processors/Transforms/SwizzleTests.cs @@ -13,7 +13,12 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms { private struct InvertXAndYSwizzler : ISwizzler { - public Size DestinationSize => new Size(10, 10); + public InvertXAndYSwizzler(Size sourceSize) + { + this.DestinationSize = new Size(sourceSize.Height, sourceSize.Width); + } + + public Size DestinationSize { get; } public void Transform(Point point, out Point newPoint) => newPoint = new Point(point.Y, point.X); @@ -26,8 +31,9 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms public void InvertXAndYSwizzle(TestImageProvider provider) where TPixel : unmanaged, IPixel { + Image image = provider.GetImage(); provider.RunValidatingProcessorTest( - ctx => ctx.Swizzle(default(InvertXAndYSwizzler)), + ctx => ctx.Swizzle(new InvertXAndYSwizzler(new Size(image.Width, image.Height))), testOutputDetails: nameof(InvertXAndYSwizzler), appendPixelTypeToFileName: false); }