Browse Source

Remove StandardImageClass

af/merge-core
James Jackson-South 9 years ago
parent
commit
5fa10c0ab3
  1. 4
      tests/ImageSharp.Tests/Drawing/BlendedShapes.cs
  2. 2
      tests/ImageSharp.Tests/Drawing/DrawImageTest.cs
  3. 2
      tests/ImageSharp.Tests/FileTestBase.cs
  4. 2
      tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs
  5. 2
      tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs
  6. 2
      tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs
  7. 16
      tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs
  8. 12
      tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs
  9. 2
      tests/ImageSharp.Tests/Formats/Jpg/JpegProfilingBenchmarks.cs
  10. 4
      tests/ImageSharp.Tests/Formats/Jpg/JpegUtilsTests.cs
  11. 2
      tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs
  12. 2
      tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs
  13. 6
      tests/ImageSharp.Tests/Formats/Png/PngSmokeTests.cs
  14. 4
      tests/ImageSharp.Tests/Processing/Binarization/BinaryThresholdTest.cs
  15. 8
      tests/ImageSharp.Tests/Processing/Binarization/DitherTest.cs
  16. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/BlackWhiteTest.cs
  17. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/ColorBlindnessTest.cs
  18. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/GrayscaleTest.cs
  19. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/HueTest.cs
  20. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/KodachromeTest.cs
  21. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/LomographTest.cs
  22. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/PolaroidTest.cs
  23. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/SaturationTest.cs
  24. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/SepiaTest.cs
  25. 4
      tests/ImageSharp.Tests/Processing/Convolution/BoxBlurTest.cs
  26. 4
      tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs
  27. 4
      tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs
  28. 4
      tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs
  29. 4
      tests/ImageSharp.Tests/Processing/Effects/AlphaTest.cs
  30. 4
      tests/ImageSharp.Tests/Processing/Effects/BackgroundColorTest.cs
  31. 4
      tests/ImageSharp.Tests/Processing/Effects/BrightnessTest.cs
  32. 4
      tests/ImageSharp.Tests/Processing/Effects/ContrastTest.cs
  33. 4
      tests/ImageSharp.Tests/Processing/Effects/InvertTest.cs
  34. 4
      tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs
  35. 4
      tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs
  36. 8
      tests/ImageSharp.Tests/Processing/Overlays/GlowTest.cs
  37. 8
      tests/ImageSharp.Tests/Processing/Overlays/VignetteTest.cs
  38. 2
      tests/ImageSharp.Tests/Processing/Transforms/AutoOrientTests.cs
  39. 2
      tests/ImageSharp.Tests/Processing/Transforms/CropTest.cs
  40. 2
      tests/ImageSharp.Tests/Processing/Transforms/EntropyCropTest.cs
  41. 2
      tests/ImageSharp.Tests/Processing/Transforms/FlipTests.cs
  42. 2
      tests/ImageSharp.Tests/Processing/Transforms/PadTest.cs
  43. 22
      tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs
  44. 2
      tests/ImageSharp.Tests/Processing/Transforms/RotateFlipTests.cs
  45. 4
      tests/ImageSharp.Tests/Processing/Transforms/RotateTests.cs
  46. 2
      tests/ImageSharp.Tests/Processing/Transforms/SkewTest.cs
  47. 2
      tests/ImageSharp.Tests/TestUtilities/ImageProviders/FileProvider.cs
  48. 4
      tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestImageProvider.cs
  49. 5
      tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs
  50. 3
      tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs
  51. 8
      tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs
  52. 8
      tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs

4
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<TPixel>(TestImageProvider<TPixel> provider, PixelBlenderMode mode)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, PixelBlenderMode mode)
where TPixel : struct, IPixel<TPixel>
{

2
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,

2
tests/ImageSharp.Tests/FileTestBase.cs

@ -47,7 +47,7 @@ namespace ImageSharp.Tests
/// <summary>
/// The standard pixel format enumeration
/// </summary>
public const PixelTypes StandardPixelType = PixelTypes.StandardImageClass;
public const PixelTypes DefaultPixelType = PixelTypes.Rgba32;
public static class Extensions
{

2
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

2
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 };

2
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)]

16
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(
TestImageProvider<TPixel> 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<TPixel>(
TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>

12
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<TPixel>(TestImageProvider<TPixel> provider, int quality, JpegSubsample subsample)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, JpegSubsample subSample, int quality)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/Formats/Jpg/JpegProfilingBenchmarks.cs

@ -72,7 +72,7 @@ namespace ImageSharp.Tests
Image<Rgba32>[] testImages =
testFiles.Select(
tf => TestImageProvider<Rgba32>.File(tf, pixelTypeOverride: PixelTypes.StandardImageClass).GetImage())
tf => TestImageProvider<Rgba32>.File(tf, pixelTypeOverride: PixelTypes.Rgba32).GetImage())
.ToArray();
using (MemoryStream ms = new MemoryStream())

4
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

2
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 =
{

2
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)]

6
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -41,7 +41,7 @@ namespace ImageSharp.Tests.Formats.Png
}
[Theory]
[WithTestPatternImages(100, 100, PixelTypes.StandardImageClass)]
[WithTestPatternImages(100, 100, PixelTypes.Rgba32)]
public void CanSaveIndexedPng<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -105,7 +105,7 @@ namespace ImageSharp.Tests.Formats.Png
//}
[Theory]
[WithTestPatternImages(300, 300, PixelTypes.StandardImageClass)]
[WithTestPatternImages(300, 300, PixelTypes.Rgba32)]
public void Resize<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel>
{

8
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<TPixel>(TestImageProvider<TPixel> provider, string name, IOrderedDither ditherer)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IOrderedDither ditherer)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IErrorDiffuser diffuser)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IErrorDiffuser diffuser)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyBlackWhiteFilterInBox<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, ColorBlindness colorBlindness)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, ColorBlindness colorBlindness)
where TPixel : struct, IPixel<TPixel>
{

4
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.
/// </summary>
[Theory]
[WithTestPatternImages(nameof(GrayscaleModeTypes), 50, 50, StandardPixelType)]
[WithTestPatternImages(nameof(GrayscaleModeTypes), 50, 50, DefaultPixelType)]
public void ImageShouldApplyGrayscaleFilterAll<TPixel>(TestImageProvider<TPixel> provider, GrayscaleMode value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, GrayscaleMode value)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyKodachromeFilterInBox<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -26,7 +26,7 @@ namespace ImageSharp.Tests
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyLomographFilterInBox<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyPolaroidFilterInBox<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplySepiaFilterInBox<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, EdgeDetection detector)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, EdgeDetection detector)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.Effects
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyBackgroundColorFilterInBox<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.Effects
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyInvertFilterInBox<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, int levels, int brushSize)
where TPixel : struct, IPixel<TPixel>
{
@ -31,7 +31,7 @@ namespace ImageSharp.Tests
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), nameof(OilPaintValues), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), nameof(OilPaintValues), DefaultPixelType)]
public void ImageShouldApplyOilPaintFilterInBox<TPixel>(TestImageProvider<TPixel> provider, int levels, int brushSize)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, int value)
where TPixel : struct, IPixel<TPixel>
{

8
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.Overlays
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyGlowFilterColor<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -36,7 +36,7 @@ namespace ImageSharp.Tests.Processing.Overlays
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyGlowFilterRadius<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -48,7 +48,7 @@ namespace ImageSharp.Tests.Processing.Overlays
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyGlowFilterInBox<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

8
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -24,7 +24,7 @@ namespace ImageSharp.Tests.Processing.Overlays
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyVignetteFilterColor<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -36,7 +36,7 @@ namespace ImageSharp.Tests.Processing.Overlays
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyVignetteFilterRadius<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
@ -48,7 +48,7 @@ namespace ImageSharp.Tests.Processing.Overlays
}
[Theory]
[WithFileCollection(nameof(DefaultFiles), StandardPixelType)]
[WithFileCollection(nameof(DefaultFiles), DefaultPixelType)]
public void ImageShouldApplyVignetteFilterInBox<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

2
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<TPixel>(TestImageProvider<TPixel> provider, RotateType rotateType, FlipType flipType, ushort orientation)
where TPixel : struct, IPixel<TPixel>
{

2
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

2
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<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel>
{

2
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<TPixel>(TestImageProvider<TPixel> provider, FlipType flipType)
where TPixel : struct, IPixel<TPixel>
{

2
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<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{

22
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<TPixel>(TestImageProvider<TPixel> provider, string name, IResampler sampler)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IResampler sampler)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IResampler sampler)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IResampler sampler)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IResampler sampler)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IResampler sampler)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IResampler sampler)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IResampler sampler)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IResampler sampler)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IResampler sampler)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, string name, IResampler sampler)
where TPixel : struct, IPixel<TPixel>
{

2
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<TPixel>(TestImageProvider<TPixel> provider, RotateType rotateType, FlipType flipType)
where TPixel : struct, IPixel<TPixel>
{

4
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<TPixel>(TestImageProvider<TPixel> provider, float value)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(TestImageProvider<TPixel> provider, RotateType value)
where TPixel : struct, IPixel<TPixel>
{

2
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<TPixel>(TestImageProvider<TPixel> provider, float x, float y)
where TPixel : struct, IPixel<TPixel>
{

2
tests/ImageSharp.Tests/TestUtilities/ImageProviders/FileProvider.cs

@ -18,7 +18,7 @@ namespace ImageSharp.Tests
private class FileProvider : TestImageProvider<TPixel>, IXunitSerializable
{
// Need PixelTypes in the dictionary key, because result images of TestImageProvider<TPixel>.FileProvider
// are shared between PixelTypes.Color & PixelTypes.StandardImageClass
// are shared between PixelTypes.Color & PixelTypes.Rgba32
private class Key : Tuple<PixelTypes, string>
{
public Key(PixelTypes item1, string item2)

4
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<TPixel>;
}
this.Utility = new ImagingTestCaseUtility()
this.Utility = new ImagingTestCaseUtility
{
SourceFileOrDescription = this.SourceFileOrDescription,
PixelTypeName = this.PixelType.ToString()

5
tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs

@ -52,11 +52,6 @@ namespace ImageSharp.Tests
Short4 = 1 << 17,
/// <summary>
/// Triggers instantiating the <see cref="Image{Rgba32}"/> subclass of <see cref="Image{TPixel}"/>
/// </summary>
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

3
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;

8
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<TPixel>(TestImageProvider<TPixel> provider, PixelTypes expected)
where TPixel : struct, IPixel<TPixel>
{
@ -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<TPixel>(
TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
@ -144,7 +144,7 @@ namespace ImageSharp.Tests
{
Image<TPixel> img = provider.GetImage();
Assert.Equal(img.Width, 3);
if (provider.PixelType == PixelTypes.StandardImageClass)
if (provider.PixelType == PixelTypes.Rgba32)
{
Assert.IsType<Image<Rgba32>>(img);
}

8
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<KeyValuePair<PixelTypes, Type>> expanded = pixelTypes.ExpandAllTypes();
@ -124,7 +124,7 @@ namespace ImageSharp.Tests
AssertContainsPixelType<Bgr565>(PixelTypes.Bgr565, expanded);
AssertContainsPixelType<Rgba32>(PixelTypes.Rgba32, expanded);
AssertContainsPixelType<HalfVector2>(PixelTypes.HalfVector2, expanded);
AssertContainsPixelType<Rgba32>(PixelTypes.StandardImageClass, expanded);
AssertContainsPixelType<Rgba32>(PixelTypes.Rgba32, expanded);
}
[Fact]
@ -134,7 +134,7 @@ namespace ImageSharp.Tests
Assert.True(expanded.Length >= TestUtilityExtensions.GetAllPixelTypes().Length - 2);
AssertContainsPixelType<Rgba32>(PixelTypes.Rgba32, expanded);
AssertContainsPixelType<Rgba32>(PixelTypes.StandardImageClass, expanded);
AssertContainsPixelType<Rgba32>(PixelTypes.Rgba32, expanded);
}
}
}

Loading…
Cancel
Save