diff --git a/tests/ImageSharp.Tests/Drawing/BlendedShapes.cs b/tests/ImageSharp.Tests/Drawing/BlendedShapes.cs index 6c742c2e0f..23f0569e75 100644 --- a/tests/ImageSharp.Tests/Drawing/BlendedShapes.cs +++ b/tests/ImageSharp.Tests/Drawing/BlendedShapes.cs @@ -18,7 +18,7 @@ namespace ImageSharp.Tests.Drawing .Select(x=> new object[] { x }); [Theory] - [WithBlankImages(nameof(modes), 100, 100, PixelTypes.StandardImageClass)] + [WithBlankImages(nameof(modes), 100, 100, PixelTypes.Rgba32)] public void DrawBlendedValues(TestImageProvider provider, PixelBlenderMode mode) where TPixel : struct, IPixel { @@ -34,7 +34,7 @@ namespace ImageSharp.Tests.Drawing } [Theory] - [WithBlankImages(nameof(modes), 100, 100, PixelTypes.StandardImageClass)] + [WithBlankImages(nameof(modes), 100, 100, PixelTypes.Rgba32)] public void DrawBlendedValues_transparent(TestImageProvider provider, PixelBlenderMode mode) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Drawing/DrawImageTest.cs b/tests/ImageSharp.Tests/Drawing/DrawImageTest.cs index 030034a8f2..42353a2aab 100644 --- a/tests/ImageSharp.Tests/Drawing/DrawImageTest.cs +++ b/tests/ImageSharp.Tests/Drawing/DrawImageTest.cs @@ -12,7 +12,7 @@ namespace ImageSharp.Tests public class DrawImageTest : FileTestBase { - private const PixelTypes PixelTypes = Tests.PixelTypes.StandardImageClass; + private const PixelTypes PixelTypes = Tests.PixelTypes.Rgba32; public static readonly string[] TestFiles = { TestImages.Jpeg.Baseline.Calliphora, diff --git a/tests/ImageSharp.Tests/FileTestBase.cs b/tests/ImageSharp.Tests/FileTestBase.cs index ff0801e8ac..51a1562f53 100644 --- a/tests/ImageSharp.Tests/FileTestBase.cs +++ b/tests/ImageSharp.Tests/FileTestBase.cs @@ -47,7 +47,7 @@ namespace ImageSharp.Tests /// /// The standard pixel format enumeration /// - public const PixelTypes StandardPixelType = PixelTypes.StandardImageClass; + public const PixelTypes DefaultPixelType = PixelTypes.Rgba32; public static class Extensions { diff --git a/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs b/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs index 411cc600a9..ec1a8c4659 100644 --- a/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs +++ b/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs @@ -14,7 +14,7 @@ namespace ImageSharp.Tests public class GeneralFormatTests : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ResolutionShouldChange(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs index a5fc92901e..89df2d086e 100644 --- a/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs @@ -14,7 +14,7 @@ namespace ImageSharp.Tests public class GifDecoderTests { - private const PixelTypes PixelTypes = Tests.PixelTypes.StandardImageClass | Tests.PixelTypes.RgbaVector | Tests.PixelTypes.Argb32; + private const PixelTypes PixelTypes = Tests.PixelTypes.Rgba32 | Tests.PixelTypes.RgbaVector | Tests.PixelTypes.Argb32; public static readonly string[] TestFiles = { TestImages.Gif.Giphy, TestImages.Gif.Rings, TestImages.Gif.Trans }; diff --git a/tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs b/tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs index b0ffaaf859..70cc8e2ba6 100644 --- a/tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs @@ -13,7 +13,7 @@ namespace ImageSharp.Tests public class GifEncoderTests { - private const PixelTypes PixelTypes = Tests.PixelTypes.StandardImageClass | Tests.PixelTypes.RgbaVector | Tests.PixelTypes.Argb32; + private const PixelTypes PixelTypes = Tests.PixelTypes.Rgba32 | Tests.PixelTypes.RgbaVector | Tests.PixelTypes.Argb32; [Theory] [WithTestPatternImages(100, 100, PixelTypes)] diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs index a6d6d31f3b..446c5e96ae 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests public static string[] ProgressiveTestJpegs = TestImages.Jpeg.Progressive.All; [Theory] - [WithFileCollection(nameof(BaselineTestJpegs), PixelTypes.Rgba32 | PixelTypes.StandardImageClass | PixelTypes.Argb32)] + [WithFileCollection(nameof(BaselineTestJpegs), PixelTypes.Rgba32 | PixelTypes.Rgba32 | PixelTypes.Argb32)] public void OpenBaselineJpeg_SaveBmp(TestImageProvider provider) where TPixel : struct, IPixel { @@ -37,7 +37,7 @@ namespace ImageSharp.Tests } [Theory] - [WithFileCollection(nameof(ProgressiveTestJpegs), PixelTypes.Rgba32 | PixelTypes.StandardImageClass | PixelTypes.Argb32)] + [WithFileCollection(nameof(ProgressiveTestJpegs), PixelTypes.Rgba32 | PixelTypes.Rgba32 | PixelTypes.Argb32)] public void OpenProgressiveJpeg_SaveBmp(TestImageProvider provider) where TPixel : struct, IPixel { @@ -48,11 +48,11 @@ namespace ImageSharp.Tests } [Theory] - [WithSolidFilledImages(16, 16, 255, 0, 0, PixelTypes.StandardImageClass, JpegSubsample.Ratio420, 75)] - [WithSolidFilledImages(16, 16, 255, 0, 0, PixelTypes.StandardImageClass, JpegSubsample.Ratio420, 100)] - [WithSolidFilledImages(16, 16, 255, 0, 0, PixelTypes.StandardImageClass, JpegSubsample.Ratio444, 75)] - [WithSolidFilledImages(16, 16, 255, 0, 0, PixelTypes.StandardImageClass, JpegSubsample.Ratio444, 100)] - [WithSolidFilledImages(8, 8, 255, 0, 0, PixelTypes.StandardImageClass, JpegSubsample.Ratio444, 100)] + [WithSolidFilledImages(16, 16, 255, 0, 0, PixelTypes.Rgba32, JpegSubsample.Ratio420, 75)] + [WithSolidFilledImages(16, 16, 255, 0, 0, PixelTypes.Rgba32, JpegSubsample.Ratio420, 100)] + [WithSolidFilledImages(16, 16, 255, 0, 0, PixelTypes.Rgba32, JpegSubsample.Ratio444, 75)] + [WithSolidFilledImages(16, 16, 255, 0, 0, PixelTypes.Rgba32, JpegSubsample.Ratio444, 100)] + [WithSolidFilledImages(8, 8, 255, 0, 0, PixelTypes.Rgba32, JpegSubsample.Ratio444, 100)] public void DecodeGenerated_SaveBmp( TestImageProvider provider, JpegSubsample subsample, @@ -79,7 +79,7 @@ namespace ImageSharp.Tests } [Theory] - [WithSolidFilledImages(42, 88, 255, 0, 0, PixelTypes.StandardImageClass)] + [WithSolidFilledImages(42, 88, 255, 0, 0, PixelTypes.Rgba32)] public void DecodeGenerated_MetadataOnly( TestImageProvider provider) where TPixel : struct, IPixel diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs index 1b4f3ea785..ab81c69b42 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs @@ -28,10 +28,10 @@ namespace ImageSharp.Tests } [Theory] - [WithFile(TestImages.Jpeg.Baseline.Snake, PixelTypes.StandardImageClass, 75, JpegSubsample.Ratio420)] - [WithFile(TestImages.Jpeg.Baseline.Lake, PixelTypes.StandardImageClass, 75, JpegSubsample.Ratio420)] - [WithFile(TestImages.Jpeg.Baseline.Snake, PixelTypes.StandardImageClass, 75, JpegSubsample.Ratio444)] - [WithFile(TestImages.Jpeg.Baseline.Lake, PixelTypes.StandardImageClass, 75, JpegSubsample.Ratio444)] + [WithFile(TestImages.Jpeg.Baseline.Snake, PixelTypes.Rgba32, 75, JpegSubsample.Ratio420)] + [WithFile(TestImages.Jpeg.Baseline.Lake, PixelTypes.Rgba32, 75, JpegSubsample.Ratio420)] + [WithFile(TestImages.Jpeg.Baseline.Snake, PixelTypes.Rgba32, 75, JpegSubsample.Ratio444)] + [WithFile(TestImages.Jpeg.Baseline.Lake, PixelTypes.Rgba32, 75, JpegSubsample.Ratio444)] public void LoadResizeSave(TestImageProvider provider, int quality, JpegSubsample subsample) where TPixel : struct, IPixel { @@ -49,8 +49,8 @@ namespace ImageSharp.Tests } [Theory] - [WithFileCollection(nameof(AllBmpFiles), PixelTypes.Rgba32 | PixelTypes.StandardImageClass | PixelTypes.Argb32, JpegSubsample.Ratio420, 75)] - [WithFileCollection(nameof(AllBmpFiles), PixelTypes.Rgba32 | PixelTypes.StandardImageClass | PixelTypes.Argb32, JpegSubsample.Ratio444, 75)] + [WithFileCollection(nameof(AllBmpFiles), PixelTypes.Rgba32 | PixelTypes.Rgba32 | PixelTypes.Argb32, JpegSubsample.Ratio420, 75)] + [WithFileCollection(nameof(AllBmpFiles), PixelTypes.Rgba32 | PixelTypes.Rgba32 | PixelTypes.Argb32, JpegSubsample.Ratio444, 75)] public void OpenBmp_SaveJpeg(TestImageProvider provider, JpegSubsample subSample, int quality) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegProfilingBenchmarks.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegProfilingBenchmarks.cs index b41826e2f6..aac3f4611b 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegProfilingBenchmarks.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegProfilingBenchmarks.cs @@ -72,7 +72,7 @@ namespace ImageSharp.Tests Image[] testImages = testFiles.Select( - tf => TestImageProvider.File(tf, pixelTypeOverride: PixelTypes.StandardImageClass).GetImage()) + tf => TestImageProvider.File(tf, pixelTypeOverride: PixelTypes.Rgba32).GetImage()) .ToArray(); using (MemoryStream ms = new MemoryStream()) diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegUtilsTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegUtilsTests.cs index f242faf12c..f681e1d8f9 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegUtilsTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegUtilsTests.cs @@ -40,7 +40,7 @@ namespace ImageSharp.Tests } [Theory] - [WithMemberFactory(nameof(CreateTestImage), PixelTypes.Rgba32| PixelTypes.StandardImageClass | PixelTypes.Argb32)] + [WithMemberFactory(nameof(CreateTestImage), PixelTypes.Rgba32| PixelTypes.Rgba32 | PixelTypes.Argb32)] public void CopyStretchedRGBTo_FromOrigo(TestImageProvider provider) where TPixel : struct, IPixel { @@ -62,7 +62,7 @@ namespace ImageSharp.Tests } [Theory] - [WithMemberFactory(nameof(CreateTestImage), PixelTypes.Rgba32| PixelTypes.StandardImageClass | PixelTypes.Argb32)] + [WithMemberFactory(nameof(CreateTestImage), PixelTypes.Rgba32| PixelTypes.Rgba32 | PixelTypes.Argb32)] public void CopyStretchedRGBTo_WithOffset(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs index 3d3f5b0069..195a8dcb3e 100644 --- a/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs @@ -13,7 +13,7 @@ namespace ImageSharp.Tests public class PngDecoderTests { - private const PixelTypes PixelTypes = Tests.PixelTypes.StandardImageClass | Tests.PixelTypes.RgbaVector | Tests.PixelTypes.Argb32; + private const PixelTypes PixelTypes = Tests.PixelTypes.Rgba32 | Tests.PixelTypes.RgbaVector | Tests.PixelTypes.Argb32; public static readonly string[] TestFiles = { diff --git a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs index 195eaba105..02edf7688f 100644 --- a/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs @@ -18,7 +18,7 @@ namespace ImageSharp.Tests public class PngEncoderTests : FileTestBase { - private const PixelTypes PixelTypes = Tests.PixelTypes.StandardImageClass | Tests.PixelTypes.RgbaVector | Tests.PixelTypes.Argb32; + private const PixelTypes PixelTypes = Tests.PixelTypes.Rgba32 | Tests.PixelTypes.RgbaVector | Tests.PixelTypes.Argb32; [Theory] [WithTestPatternImages(100, 100, PixelTypes, PngColorType.RgbWithAlpha)] diff --git a/tests/ImageSharp.Tests/Formats/Png/PngSmokeTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngSmokeTests.cs index 22bb0b2447..90f994f366 100644 --- a/tests/ImageSharp.Tests/Formats/Png/PngSmokeTests.cs +++ b/tests/ImageSharp.Tests/Formats/Png/PngSmokeTests.cs @@ -20,7 +20,7 @@ namespace ImageSharp.Tests.Formats.Png public class PngSmokeTests { [Theory] - [WithTestPatternImages(300, 300, PixelTypes.StandardImageClass)] + [WithTestPatternImages(300, 300, PixelTypes.Rgba32)] public void GeneralTest(TestImageProvider provider) where TPixel : struct, IPixel { @@ -41,7 +41,7 @@ namespace ImageSharp.Tests.Formats.Png } [Theory] - [WithTestPatternImages(100, 100, PixelTypes.StandardImageClass)] + [WithTestPatternImages(100, 100, PixelTypes.Rgba32)] public void CanSaveIndexedPng(TestImageProvider provider) where TPixel : struct, IPixel { @@ -105,7 +105,7 @@ namespace ImageSharp.Tests.Formats.Png //} [Theory] - [WithTestPatternImages(300, 300, PixelTypes.StandardImageClass)] + [WithTestPatternImages(300, 300, PixelTypes.Rgba32)] public void Resize(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Binarization/BinaryThresholdTest.cs b/tests/ImageSharp.Tests/Processing/Binarization/BinaryThresholdTest.cs index f9a5a9628a..e792de22f0 100644 --- a/tests/ImageSharp.Tests/Processing/Binarization/BinaryThresholdTest.cs +++ b/tests/ImageSharp.Tests/Processing/Binarization/BinaryThresholdTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Binarization }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(BinaryThresholdValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(BinaryThresholdValues), DefaultPixelType)] public void ImageShouldApplyBinaryThresholdFilter(TestImageProvider provider, float value) where TPixel : struct, IPixel { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.Binarization } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(BinaryThresholdValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(BinaryThresholdValues), DefaultPixelType)] public void ImageShouldApplyBinaryThresholdInBox(TestImageProvider provider, float value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Binarization/DitherTest.cs b/tests/ImageSharp.Tests/Processing/Binarization/DitherTest.cs index f5227e7d03..2948c10460 100644 --- a/tests/ImageSharp.Tests/Processing/Binarization/DitherTest.cs +++ b/tests/ImageSharp.Tests/Processing/Binarization/DitherTest.cs @@ -32,7 +32,7 @@ namespace ImageSharp.Tests.Processing.Binarization }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(Ditherers), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(Ditherers), DefaultPixelType)] public void ImageShouldApplyDitherFilter(TestImageProvider provider, string name, IOrderedDither ditherer) where TPixel : struct, IPixel { @@ -44,7 +44,7 @@ namespace ImageSharp.Tests.Processing.Binarization } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(Ditherers), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(Ditherers), DefaultPixelType)] public void ImageShouldApplyDitherFilterInBox(TestImageProvider provider, string name, IOrderedDither ditherer) where TPixel : struct, IPixel { @@ -61,7 +61,7 @@ namespace ImageSharp.Tests.Processing.Binarization } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(ErrorDiffusers), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(ErrorDiffusers), DefaultPixelType)] public void ImageShouldApplyDiffusionFilter(TestImageProvider provider, string name, IErrorDiffuser diffuser) where TPixel : struct, IPixel { @@ -73,7 +73,7 @@ namespace ImageSharp.Tests.Processing.Binarization } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(ErrorDiffusers), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(ErrorDiffusers), DefaultPixelType)] public void ImageShouldApplyDiffusionFilterInBox(TestImageProvider provider, string name, IErrorDiffuser diffuser) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/BlackWhiteTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/BlackWhiteTest.cs index 73847ae3ad..d825b4993a 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/BlackWhiteTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/BlackWhiteTest.cs @@ -12,7 +12,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix public class BlackWhiteTest : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyBlackWhiteFilter(TestImageProvider provider) where TPixel : struct, IPixel { @@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyBlackWhiteFilterInBox(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/ColorBlindnessTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/ColorBlindnessTest.cs index 6d144fdae1..b56ec3471a 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/ColorBlindnessTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/ColorBlindnessTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(ColorBlindnessFilters), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(ColorBlindnessFilters), DefaultPixelType)] public void ImageShouldApplyColorBlindnessFilter(TestImageProvider provider, ColorBlindness colorBlindness) where TPixel : struct, IPixel { @@ -38,7 +38,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(ColorBlindnessFilters), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(ColorBlindnessFilters), DefaultPixelType)] public void ImageShouldApplyColorBlindnessFilterInBox(TestImageProvider provider, ColorBlindness colorBlindness) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/GrayscaleTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/GrayscaleTest.cs index 11d53a4c75..89a388e4d4 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/GrayscaleTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/GrayscaleTest.cs @@ -23,7 +23,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix /// Use test patterns over loaded images to save decode time. /// [Theory] - [WithTestPatternImages(nameof(GrayscaleModeTypes), 50, 50, StandardPixelType)] + [WithTestPatternImages(nameof(GrayscaleModeTypes), 50, 50, DefaultPixelType)] public void ImageShouldApplyGrayscaleFilterAll(TestImageProvider provider, GrayscaleMode value) where TPixel : struct, IPixel { @@ -43,7 +43,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix } [Theory] - [WithTestPatternImages(nameof(GrayscaleModeTypes), 50, 50, StandardPixelType)] + [WithTestPatternImages(nameof(GrayscaleModeTypes), 50, 50, DefaultPixelType)] public void ImageShouldApplyGrayscaleFilterInBox(TestImageProvider provider, GrayscaleMode value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/HueTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/HueTest.cs index e7dffe74a8..b71905374a 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/HueTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/HueTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(HueValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(HueValues), DefaultPixelType)] public void ImageShouldApplyHueFilter(TestImageProvider provider, int value) where TPixel : struct, IPixel { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(HueValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(HueValues), DefaultPixelType)] public void ImageShouldApplyHueFilterInBox(TestImageProvider provider, int value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/KodachromeTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/KodachromeTest.cs index 2da4e9feaa..3a5d4f0d34 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/KodachromeTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/KodachromeTest.cs @@ -12,7 +12,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix public class KodachromeTest : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyKodachromeFilter(TestImageProvider provider) where TPixel : struct, IPixel { @@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyKodachromeFilterInBox(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/LomographTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/LomographTest.cs index 629d9793a1..bfa37eef4e 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/LomographTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/LomographTest.cs @@ -14,7 +14,7 @@ namespace ImageSharp.Tests public class LomographTest : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyLomographFilter(TestImageProvider provider) where TPixel : struct, IPixel { @@ -26,7 +26,7 @@ namespace ImageSharp.Tests } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyLomographFilterInBox(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/PolaroidTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/PolaroidTest.cs index b66589f4d7..2bf1c36989 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/PolaroidTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/PolaroidTest.cs @@ -12,7 +12,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix public class PolaroidTest : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyPolaroidFilter(TestImageProvider provider) where TPixel : struct, IPixel { @@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyPolaroidFilterInBox(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/SaturationTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/SaturationTest.cs index 66c92262db..9212c09e83 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/SaturationTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/SaturationTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(SaturationValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(SaturationValues), DefaultPixelType)] public void ImageShouldApplySaturationFilter(TestImageProvider provider, int value) where TPixel : struct, IPixel { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(SaturationValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(SaturationValues), DefaultPixelType)] public void ImageShouldApplySaturationFilterInBox(TestImageProvider provider, int value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/SepiaTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/SepiaTest.cs index 5a54235faa..de536050ba 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/SepiaTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/SepiaTest.cs @@ -12,7 +12,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix public class SepiaTest : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplySepiaFilter(TestImageProvider provider) where TPixel : struct, IPixel { @@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplySepiaFilterInBox(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Convolution/BoxBlurTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/BoxBlurTest.cs index cbcdd6b494..b5ee876de7 100644 --- a/tests/ImageSharp.Tests/Processing/Convolution/BoxBlurTest.cs +++ b/tests/ImageSharp.Tests/Processing/Convolution/BoxBlurTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Convolution }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(BoxBlurValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(BoxBlurValues), DefaultPixelType)] public void ImageShouldApplyBoxBlurFilter(TestImageProvider provider, int value) where TPixel : struct, IPixel { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.Convolution } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(BoxBlurValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(BoxBlurValues), DefaultPixelType)] public void ImageShouldApplyBoxBlurFilterInBox(TestImageProvider provider, int value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs index 880c5beae3..220c0f4664 100644 --- a/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs +++ b/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs @@ -28,7 +28,7 @@ namespace ImageSharp.Tests.Processing.Convolution }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(DetectEdgesFilters), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(DetectEdgesFilters), DefaultPixelType)] public void ImageShouldApplyDetectEdgesFilter(TestImageProvider provider, EdgeDetection detector) where TPixel : struct, IPixel { @@ -40,7 +40,7 @@ namespace ImageSharp.Tests.Processing.Convolution } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(DetectEdgesFilters), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(DetectEdgesFilters), DefaultPixelType)] public void ImageShouldApplyDetectEdgesFilterInBox(TestImageProvider provider, EdgeDetection detector) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs index 01b56dec8f..dbaed9290c 100644 --- a/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs +++ b/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Convolution }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(GaussianBlurValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(GaussianBlurValues), DefaultPixelType)] public void ImageShouldApplyGaussianBlurFilter(TestImageProvider provider, int value) where TPixel : struct, IPixel { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.Convolution } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(GaussianBlurValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(GaussianBlurValues), DefaultPixelType)] public void ImageShouldApplyGaussianBlurFilterInBox(TestImageProvider provider, int value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs index f0ac37e1bf..44296d9751 100644 --- a/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs +++ b/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Convolution }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(GaussianSharpenValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(GaussianSharpenValues), DefaultPixelType)] public void ImageShouldApplyGaussianSharpenFilter(TestImageProvider provider, int value) where TPixel : struct, IPixel { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.Convolution } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(GaussianSharpenValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(GaussianSharpenValues), DefaultPixelType)] public void ImageShouldApplyGaussianSharpenFilterInBox(TestImageProvider provider, int value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Effects/AlphaTest.cs b/tests/ImageSharp.Tests/Processing/Effects/AlphaTest.cs index 7370762701..63366dc1da 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/AlphaTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/AlphaTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Effects }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(AlphaValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(AlphaValues), DefaultPixelType)] public void ImageShouldApplyAlphaFilter(TestImageProvider provider, float value) where TPixel : struct, IPixel { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.Effects } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(AlphaValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(AlphaValues), DefaultPixelType)] public void ImageShouldApplyAlphaFilterInBox(TestImageProvider provider, float value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Effects/BackgroundColorTest.cs b/tests/ImageSharp.Tests/Processing/Effects/BackgroundColorTest.cs index 97e6471f84..c3fda4cd4b 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/BackgroundColorTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/BackgroundColorTest.cs @@ -12,7 +12,7 @@ namespace ImageSharp.Tests.Processing.Effects public class BackgroundColorTest : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyBackgroundColorFilter(TestImageProvider provider) where TPixel : struct, IPixel { @@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.Effects } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyBackgroundColorFilterInBox(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Effects/BrightnessTest.cs b/tests/ImageSharp.Tests/Processing/Effects/BrightnessTest.cs index 580b18187b..4c0217fed0 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/BrightnessTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/BrightnessTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Effects }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(BrightnessValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(BrightnessValues), DefaultPixelType)] public void ImageShouldApplyBrightnessFilter(TestImageProvider provider, int value) where TPixel : struct, IPixel { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.Effects } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(BrightnessValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(BrightnessValues), DefaultPixelType)] public void ImageShouldApplyBrightnessFilterInBox(TestImageProvider provider, int value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Effects/ContrastTest.cs b/tests/ImageSharp.Tests/Processing/Effects/ContrastTest.cs index 3003e9ddcc..ac217e9f6a 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/ContrastTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/ContrastTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Effects }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(ContrastValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(ContrastValues), DefaultPixelType)] public void ImageShouldApplyContrastFilter(TestImageProvider provider, int value) where TPixel : struct, IPixel { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.Effects } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(ContrastValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(ContrastValues), DefaultPixelType)] public void ImageShouldApplyContrastFilterInBox(TestImageProvider provider, int value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Effects/InvertTest.cs b/tests/ImageSharp.Tests/Processing/Effects/InvertTest.cs index 8ad36e54c0..80e3450926 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/InvertTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/InvertTest.cs @@ -12,7 +12,7 @@ namespace ImageSharp.Tests.Processing.Effects public class InvertTest : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyInvertFilter(TestImageProvider provider) where TPixel : struct, IPixel { @@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.Effects } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyInvertFilterInBox(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs b/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs index de9bf583db..7d02ace3da 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(OilPaintValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(OilPaintValues), DefaultPixelType)] public void ImageShouldApplyOilPaintFilter(TestImageProvider provider, int levels, int brushSize) where TPixel : struct, IPixel { @@ -31,7 +31,7 @@ namespace ImageSharp.Tests } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(OilPaintValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(OilPaintValues), DefaultPixelType)] public void ImageShouldApplyOilPaintFilterInBox(TestImageProvider provider, int levels, int brushSize) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs b/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs index d7cff18c30..740b78c558 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Effects }; [Theory] - [WithTestPatternImages(nameof(PixelateValues), 320, 240, PixelTypes.StandardImageClass)] + [WithTestPatternImages(nameof(PixelateValues), 320, 240, PixelTypes.Rgba32)] public void ImageShouldApplyPixelateFilter(TestImageProvider provider, int value) where TPixel : struct, IPixel { @@ -47,7 +47,7 @@ namespace ImageSharp.Tests.Processing.Effects } [Theory] - [WithTestPatternImages(nameof(PixelateValues), 320, 240, PixelTypes.StandardImageClass)] + [WithTestPatternImages(nameof(PixelateValues), 320, 240, PixelTypes.Rgba32)] public void ImageShouldApplyPixelateFilterInBox(TestImageProvider provider, int value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Overlays/GlowTest.cs b/tests/ImageSharp.Tests/Processing/Overlays/GlowTest.cs index 0c4ad72eed..a233e204cb 100644 --- a/tests/ImageSharp.Tests/Processing/Overlays/GlowTest.cs +++ b/tests/ImageSharp.Tests/Processing/Overlays/GlowTest.cs @@ -12,7 +12,7 @@ namespace ImageSharp.Tests.Processing.Overlays public class GlowTest : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyGlowFilter(TestImageProvider provider) where TPixel : struct, IPixel { @@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.Overlays } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyGlowFilterColor(TestImageProvider provider) where TPixel : struct, IPixel { @@ -36,7 +36,7 @@ namespace ImageSharp.Tests.Processing.Overlays } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyGlowFilterRadius(TestImageProvider provider) where TPixel : struct, IPixel { @@ -48,7 +48,7 @@ namespace ImageSharp.Tests.Processing.Overlays } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyGlowFilterInBox(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Overlays/VignetteTest.cs b/tests/ImageSharp.Tests/Processing/Overlays/VignetteTest.cs index 583331bad3..85ccfca6f0 100644 --- a/tests/ImageSharp.Tests/Processing/Overlays/VignetteTest.cs +++ b/tests/ImageSharp.Tests/Processing/Overlays/VignetteTest.cs @@ -12,7 +12,7 @@ namespace ImageSharp.Tests.Processing.Overlays public class VignetteTest : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyVignetteFilter(TestImageProvider provider) where TPixel : struct, IPixel { @@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.Overlays } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyVignetteFilterColor(TestImageProvider provider) where TPixel : struct, IPixel { @@ -36,7 +36,7 @@ namespace ImageSharp.Tests.Processing.Overlays } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyVignetteFilterRadius(TestImageProvider provider) where TPixel : struct, IPixel { @@ -48,7 +48,7 @@ namespace ImageSharp.Tests.Processing.Overlays } [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldApplyVignetteFilterInBox(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Transforms/AutoOrientTests.cs b/tests/ImageSharp.Tests/Processing/Transforms/AutoOrientTests.cs index d77a54c4f3..7bc0c8bb52 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/AutoOrientTests.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/AutoOrientTests.cs @@ -29,7 +29,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; [Theory] - [WithFileCollection(nameof(FlipFiles), nameof(OrientationValues), StandardPixelType)] + [WithFileCollection(nameof(FlipFiles), nameof(OrientationValues), DefaultPixelType)] public void ImageShouldAutoRotate(TestImageProvider provider, RotateType rotateType, FlipType flipType, ushort orientation) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Transforms/CropTest.cs b/tests/ImageSharp.Tests/Processing/Transforms/CropTest.cs index 82ae2e8b8f..ca20abf790 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/CropTest.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/CropTest.cs @@ -12,7 +12,7 @@ namespace ImageSharp.Tests.Processing.Transforms public class CropTest : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldCrop(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Transforms/EntropyCropTest.cs b/tests/ImageSharp.Tests/Processing/Transforms/EntropyCropTest.cs index 5b1dd04421..24febd5b2f 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/EntropyCropTest.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/EntropyCropTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(EntropyCropValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(EntropyCropValues), DefaultPixelType)] public void ImageShouldEntropyCrop(TestImageProvider provider, float value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Transforms/FlipTests.cs b/tests/ImageSharp.Tests/Processing/Transforms/FlipTests.cs index e002ebc706..45ab1e5f8b 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/FlipTests.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/FlipTests.cs @@ -23,7 +23,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; [Theory] - [WithFileCollection(nameof(FlipFiles), nameof(FlipValues), StandardPixelType)] + [WithFileCollection(nameof(FlipFiles), nameof(FlipValues), DefaultPixelType)] public void ImageShouldFlip(TestImageProvider provider, FlipType flipType) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Transforms/PadTest.cs b/tests/ImageSharp.Tests/Processing/Transforms/PadTest.cs index ee03193aeb..666f3df78e 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/PadTest.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/PadTest.cs @@ -12,7 +12,7 @@ namespace ImageSharp.Tests.Processing.Transforms public class PadTest : FileTestBase { [Theory] - [WithFileCollection(nameof(DefaultFiles), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), DefaultPixelType)] public void ImageShouldPad(TestImageProvider provider) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs b/tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs index 8244f17c3c..008d041e7e 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs @@ -33,7 +33,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; [Theory] - [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), StandardPixelType)] + [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), DefaultPixelType)] public void ImageShouldResize(TestImageProvider provider, string name, IResampler sampler) where TPixel : struct, IPixel { @@ -45,7 +45,7 @@ namespace ImageSharp.Tests.Processing.Transforms } [Theory] - [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), StandardPixelType)] + [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), DefaultPixelType)] public void ImageShouldResizeFromSourceRectangle(TestImageProvider provider, string name, IResampler sampler) where TPixel : struct, IPixel { @@ -60,7 +60,7 @@ namespace ImageSharp.Tests.Processing.Transforms } [Theory] - [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), StandardPixelType)] + [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), DefaultPixelType)] public void ImageShouldResizeWidthAndKeepAspect(TestImageProvider provider, string name, IResampler sampler) where TPixel : struct, IPixel { @@ -72,7 +72,7 @@ namespace ImageSharp.Tests.Processing.Transforms } [Theory] - [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), StandardPixelType)] + [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), DefaultPixelType)] public void ImageShouldResizeHeightAndKeepAspect(TestImageProvider provider, string name, IResampler sampler) where TPixel : struct, IPixel { @@ -84,7 +84,7 @@ namespace ImageSharp.Tests.Processing.Transforms } [Theory] - [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), StandardPixelType)] + [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), DefaultPixelType)] public void ImageShouldResizeWithCropWidthMode(TestImageProvider provider, string name, IResampler sampler) where TPixel : struct, IPixel { @@ -102,7 +102,7 @@ namespace ImageSharp.Tests.Processing.Transforms } [Theory] - [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), StandardPixelType)] + [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), DefaultPixelType)] public void ImageShouldResizeWithCropHeightMode(TestImageProvider provider, string name, IResampler sampler) where TPixel : struct, IPixel { @@ -120,7 +120,7 @@ namespace ImageSharp.Tests.Processing.Transforms } [Theory] - [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), StandardPixelType)] + [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), DefaultPixelType)] public void ImageShouldResizeWithPadMode(TestImageProvider provider, string name, IResampler sampler) where TPixel : struct, IPixel { @@ -139,7 +139,7 @@ namespace ImageSharp.Tests.Processing.Transforms } [Theory] - [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), StandardPixelType)] + [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), DefaultPixelType)] public void ImageShouldResizeWithBoxPadMode(TestImageProvider provider, string name, IResampler sampler) where TPixel : struct, IPixel { @@ -158,7 +158,7 @@ namespace ImageSharp.Tests.Processing.Transforms } [Theory] - [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), StandardPixelType)] + [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), DefaultPixelType)] public void ImageShouldResizeWithMaxMode(TestImageProvider provider, string name, IResampler sampler) where TPixel : struct, IPixel { @@ -177,7 +177,7 @@ namespace ImageSharp.Tests.Processing.Transforms } [Theory] - [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), StandardPixelType)] + [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), DefaultPixelType)] public void ImageShouldResizeWithMinMode(TestImageProvider provider, string name, IResampler sampler) where TPixel : struct, IPixel { @@ -196,7 +196,7 @@ namespace ImageSharp.Tests.Processing.Transforms } [Theory] - [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), StandardPixelType)] + [WithFileCollection(nameof(ResizeFiles), nameof(ReSamplers), DefaultPixelType)] public void ImageShouldResizeWithStretchMode(TestImageProvider provider, string name, IResampler sampler) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Transforms/RotateFlipTests.cs b/tests/ImageSharp.Tests/Processing/Transforms/RotateFlipTests.cs index bdea4b2235..f85ef6f13a 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/RotateFlipTests.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/RotateFlipTests.cs @@ -25,7 +25,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; [Theory] - [WithFileCollection(nameof(FlipFiles), nameof(RotateFlipValues), StandardPixelType)] + [WithFileCollection(nameof(FlipFiles), nameof(RotateFlipValues), DefaultPixelType)] public void ImageShouldRotateFlip(TestImageProvider provider, RotateType rotateType, FlipType flipType) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Transforms/RotateTests.cs b/tests/ImageSharp.Tests/Processing/Transforms/RotateTests.cs index 42e89bb5f7..1f18564290 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/RotateTests.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/RotateTests.cs @@ -29,7 +29,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(RotateFloatValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(RotateFloatValues), DefaultPixelType)] public void ImageShouldRotate(TestImageProvider provider, float value) where TPixel : struct, IPixel { @@ -41,7 +41,7 @@ namespace ImageSharp.Tests.Processing.Transforms } [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(RotateEnumValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(RotateEnumValues), DefaultPixelType)] public void ImageShouldRotateEnum(TestImageProvider provider, RotateType value) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/Processing/Transforms/SkewTest.cs b/tests/ImageSharp.Tests/Processing/Transforms/SkewTest.cs index 2c393acac6..f2c2d7cbd2 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/SkewTest.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/SkewTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; [Theory] - [WithFileCollection(nameof(DefaultFiles), nameof(SkewValues), StandardPixelType)] + [WithFileCollection(nameof(DefaultFiles), nameof(SkewValues), DefaultPixelType)] public void ImageShouldSkew(TestImageProvider provider, float x, float y) where TPixel : struct, IPixel { diff --git a/tests/ImageSharp.Tests/TestUtilities/ImageProviders/FileProvider.cs b/tests/ImageSharp.Tests/TestUtilities/ImageProviders/FileProvider.cs index 9e8e0dce3f..16eecd2fc7 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ImageProviders/FileProvider.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ImageProviders/FileProvider.cs @@ -18,7 +18,7 @@ namespace ImageSharp.Tests private class FileProvider : TestImageProvider, IXunitSerializable { // Need PixelTypes in the dictionary key, because result images of TestImageProvider.FileProvider - // are shared between PixelTypes.Color & PixelTypes.StandardImageClass + // are shared between PixelTypes.Color & PixelTypes.Rgba32 private class Key : Tuple { public Key(PixelTypes item1, string item2) diff --git a/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestImageProvider.cs b/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestImageProvider.cs index bf30d48474..03a685d34f 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestImageProvider.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestImageProvider.cs @@ -107,12 +107,12 @@ namespace ImageSharp.Tests this.TypeName = typeName; this.MethodName = methodName; - if (pixelTypeOverride == PixelTypes.StandardImageClass) + if (pixelTypeOverride == PixelTypes.Rgba32) { this.Factory = new ImageFactory() as GenericFactory; } - this.Utility = new ImagingTestCaseUtility() + this.Utility = new ImagingTestCaseUtility { SourceFileOrDescription = this.SourceFileOrDescription, PixelTypeName = this.PixelType.ToString() diff --git a/tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs b/tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs index f64b772717..5c676d07c7 100644 --- a/tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs +++ b/tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs @@ -52,11 +52,6 @@ namespace ImageSharp.Tests Short4 = 1 << 17, - /// - /// Triggers instantiating the subclass of - /// - StandardImageClass = 1 << 29, - // TODO: Add multi-flag entries by rules defined in PackedPixelConverterHelper // "All" is handled as a separate, individual case instead of using bitwise OR diff --git a/tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs b/tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs index 115fb895d2..e42cbe1934 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs +++ b/tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs @@ -38,14 +38,13 @@ namespace ImageSharp.Tests // Add PixelFormat types string nameSpace = typeof(Alpha8).FullName; nameSpace = nameSpace.Substring(0, nameSpace.Length - typeof(Alpha8).Name.Length - 1); - foreach (PixelTypes pt in AllConcretePixelTypes.Where(pt => pt != PixelTypes.StandardImageClass && pt != PixelTypes.Rgba32)) + foreach (PixelTypes pt in AllConcretePixelTypes.Where(pt => pt != PixelTypes.Rgba32)) { string typeName = $"{nameSpace}.{pt}"; Type t = ImageSharpAssembly.GetType(typeName); PixelTypes2ClrTypes[pt] = t ?? throw new InvalidOperationException($"Could not find: {typeName}"); ClrTypes2PixelTypes[t] = pt; } - PixelTypes2ClrTypes[PixelTypes.StandardImageClass] = defaultPixelFormatType; } public static bool HasFlag(this PixelTypes pixelTypes, PixelTypes flag) => (pixelTypes & flag) == flag; diff --git a/tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs b/tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs index 4d3a0d9912..6bd5b392d6 100644 --- a/tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs +++ b/tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs @@ -50,7 +50,7 @@ namespace ImageSharp.Tests [Theory] [WithBlankImages(1, 1, PixelTypes.Rgba32, PixelTypes.Rgba32)] [WithBlankImages(1, 1, PixelTypes.Alpha8, PixelTypes.Alpha8)] - [WithBlankImages(1, 1, PixelTypes.StandardImageClass, PixelTypes.StandardImageClass)] + [WithBlankImages(1, 1, PixelTypes.Rgba32, PixelTypes.Rgba32)] public void PixelType_PropertyValueIsCorrect(TestImageProvider provider, PixelTypes expected) where TPixel : struct, IPixel { @@ -58,8 +58,8 @@ namespace ImageSharp.Tests } [Theory] - [WithBlankImages(1, 1, PixelTypes.StandardImageClass)] - [WithFile(TestImages.Bmp.F, PixelTypes.StandardImageClass)] + [WithBlankImages(1, 1, PixelTypes.Rgba32)] + [WithFile(TestImages.Bmp.F, PixelTypes.Rgba32)] public void PixelTypes_ColorWithDefaultImageClass_TriggersCreatingTheNonGenericDerivedImageClass( TestImageProvider provider) where TPixel : struct, IPixel @@ -144,7 +144,7 @@ namespace ImageSharp.Tests { Image img = provider.GetImage(); Assert.Equal(img.Width, 3); - if (provider.PixelType == PixelTypes.StandardImageClass) + if (provider.PixelType == PixelTypes.Rgba32) { Assert.IsType>(img); } diff --git a/tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs b/tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs index 9ff0ca64e7..5195f2062a 100644 --- a/tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs +++ b/tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs @@ -89,7 +89,7 @@ namespace ImageSharp.Tests [InlineData(PixelTypes.Rgba32, typeof(Rgba32))] [InlineData(PixelTypes.Argb32, typeof(Argb32))] [InlineData(PixelTypes.HalfVector4, typeof(HalfVector4))] - [InlineData(PixelTypes.StandardImageClass, typeof(Rgba32))] + [InlineData(PixelTypes.Rgba32, typeof(Rgba32))] public void ToType(PixelTypes pt, Type expectedType) { Assert.Equal(pt.ToType(), expectedType); @@ -114,7 +114,7 @@ namespace ImageSharp.Tests [Fact] public void ToTypes() { - PixelTypes pixelTypes = PixelTypes.Alpha8 | PixelTypes.Bgr565 | PixelTypes.Rgba32 | PixelTypes.HalfVector2 | PixelTypes.StandardImageClass; + PixelTypes pixelTypes = PixelTypes.Alpha8 | PixelTypes.Bgr565 | PixelTypes.Rgba32 | PixelTypes.HalfVector2 | PixelTypes.Rgba32; IEnumerable> expanded = pixelTypes.ExpandAllTypes(); @@ -124,7 +124,7 @@ namespace ImageSharp.Tests AssertContainsPixelType(PixelTypes.Bgr565, expanded); AssertContainsPixelType(PixelTypes.Rgba32, expanded); AssertContainsPixelType(PixelTypes.HalfVector2, expanded); - AssertContainsPixelType(PixelTypes.StandardImageClass, expanded); + AssertContainsPixelType(PixelTypes.Rgba32, expanded); } [Fact] @@ -134,7 +134,7 @@ namespace ImageSharp.Tests Assert.True(expanded.Length >= TestUtilityExtensions.GetAllPixelTypes().Length - 2); AssertContainsPixelType(PixelTypes.Rgba32, expanded); - AssertContainsPixelType(PixelTypes.StandardImageClass, expanded); + AssertContainsPixelType(PixelTypes.Rgba32, expanded); } } }