File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
tests/ImageSharp.Tests/Processing/Processors/Transforms Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,12 @@ public class SwizzleTests
1313 {
1414 private struct InvertXAndYSwizzler : ISwizzler
1515 {
16- public Size DestinationSize => new Size ( 10 , 10 ) ;
16+ public InvertXAndYSwizzler ( Size sourceSize )
17+ {
18+ this . DestinationSize = new Size ( sourceSize . Height , sourceSize . Width ) ;
19+ }
20+
21+ public Size DestinationSize { get ; }
1722
1823 public void Transform ( Point point , out Point newPoint )
1924 => newPoint = new Point ( point . Y , point . X ) ;
@@ -26,8 +31,9 @@ public void Transform(Point point, out Point newPoint)
2631 public void InvertXAndYSwizzle < TPixel > ( TestImageProvider < TPixel > provider )
2732 where TPixel : unmanaged, IPixel < TPixel >
2833 {
34+ Image < TPixel > image = provider . GetImage ( ) ;
2935 provider . RunValidatingProcessorTest (
30- ctx => ctx . Swizzle ( default ( InvertXAndYSwizzler ) ) ,
36+ ctx => ctx . Swizzle ( new InvertXAndYSwizzler ( new Size ( image . Width , image . Height ) ) ) ,
3137 testOutputDetails : nameof ( InvertXAndYSwizzler ) ,
3238 appendPixelTypeToFileName : false ) ;
3339 }
You can’t perform that action at this time.
0 commit comments