diff --git a/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs b/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs index ec1a8c4659..c8b4a71ef6 100644 --- a/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs +++ b/tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs @@ -22,7 +22,7 @@ namespace ImageSharp.Tests { image.MetaData.VerticalResolution = 150; image.MetaData.HorizontalResolution = 150; - image.DebugSave(provider, null, Extensions.Bmp); + image.DebugSave(provider); } } diff --git a/tests/ImageSharp.Tests/Formats/Jpg/BadEofJpegTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/BadEofJpegTests.cs index dc6985dd34..05f12e6111 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/BadEofJpegTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/BadEofJpegTests.cs @@ -35,7 +35,7 @@ namespace ImageSharp.Tests using (Image image = provider.GetImage()) { Assert.NotNull(image); - provider.Utility.SaveTestOutputFile(image, "bmp"); + image.DebugSave(provider); } } @@ -47,7 +47,7 @@ namespace ImageSharp.Tests using (Image image = provider.GetImage()) { Assert.NotNull(image); - provider.Utility.SaveTestOutputFile(image, "bmp"); + image.DebugSave(provider); } } } diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs index 446c5e96ae..2e68d49ddc 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs @@ -27,23 +27,23 @@ namespace ImageSharp.Tests [Theory] [WithFileCollection(nameof(BaselineTestJpegs), PixelTypes.Rgba32 | PixelTypes.Rgba32 | PixelTypes.Argb32)] - public void OpenBaselineJpeg_SaveBmp(TestImageProvider provider) + public void DecodeBaselineJpeg(TestImageProvider provider) where TPixel : struct, IPixel { using (Image image = provider.GetImage()) { - provider.Utility.SaveTestOutputFile(image, "bmp"); + image.DebugSave(provider); } } [Theory] [WithFileCollection(nameof(ProgressiveTestJpegs), PixelTypes.Rgba32 | PixelTypes.Rgba32 | PixelTypes.Argb32)] - public void OpenProgressiveJpeg_SaveBmp(TestImageProvider provider) + public void DecodeProgressiveJpeg(TestImageProvider provider) where TPixel : struct, IPixel { using (Image image = provider.GetImage()) { - provider.Utility.SaveTestOutputFile(image, "bmp"); + image.DebugSave(provider); } } @@ -53,7 +53,7 @@ namespace ImageSharp.Tests [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( + public void DecodeGenerated( TestImageProvider provider, JpegSubsample subsample, int quality) @@ -75,7 +75,7 @@ namespace ImageSharp.Tests // TODO: Automatic image comparers could help here a lot :P Image mirror = provider.Factory.CreateImage(data); provider.Utility.TestName += $"_{subsample}_Q{quality}"; - provider.Utility.SaveTestOutputFile(mirror, "bmp"); + mirror.DebugSave(provider); } [Theory] diff --git a/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs index 5ab1fac2f0..0e971c3d5f 100644 --- a/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs @@ -23,12 +23,12 @@ namespace ImageSharp.Tests [Theory] [WithFileCollection(nameof(TestFiles), PixelTypes)] - public void DecodeAndReSave(TestImageProvider imageProvider) + public void Decode(TestImageProvider imageProvider) where TPixel : struct, IPixel { using (Image image = imageProvider.GetImage()) { - imageProvider.Utility.SaveTestOutputFile(image, "bmp"); + image.DebugSave(imageProvider); } } diff --git a/tests/ImageSharp.Tests/Processing/Binarization/BinaryThresholdTest.cs b/tests/ImageSharp.Tests/Processing/Binarization/BinaryThresholdTest.cs index 642df598a3..18c3a0812b 100644 --- a/tests/ImageSharp.Tests/Processing/Binarization/BinaryThresholdTest.cs +++ b/tests/ImageSharp.Tests/Processing/Binarization/BinaryThresholdTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Binarization using (Image image = provider.GetImage()) { image.BinaryThreshold(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); } } @@ -42,7 +42,7 @@ namespace ImageSharp.Tests.Processing.Binarization var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.BinaryThreshold(value, bounds) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Binarization/DitherTest.cs b/tests/ImageSharp.Tests/Processing/Binarization/DitherTest.cs index a06397c864..df36a76ab2 100644 --- a/tests/ImageSharp.Tests/Processing/Binarization/DitherTest.cs +++ b/tests/ImageSharp.Tests/Processing/Binarization/DitherTest.cs @@ -39,7 +39,7 @@ namespace ImageSharp.Tests.Processing.Binarization using (Image image = provider.GetImage()) { image.Dither(ditherer) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } @@ -54,7 +54,7 @@ namespace ImageSharp.Tests.Processing.Binarization var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Dither(ditherer, bounds) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } @@ -68,7 +68,7 @@ namespace ImageSharp.Tests.Processing.Binarization using (Image image = provider.GetImage()) { image.Dither(diffuser, .5F) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } @@ -83,7 +83,7 @@ namespace ImageSharp.Tests.Processing.Binarization var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Dither(diffuser,.5F, bounds) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/BlackWhiteTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/BlackWhiteTest.cs index 4dc70fb0f5..9de191395d 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/BlackWhiteTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/BlackWhiteTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix using (Image image = provider.GetImage()) { image.BlackWhite() - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -34,7 +34,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.BlackWhite(bounds) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/ColorBlindnessTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/ColorBlindnessTest.cs index bc1c8ad226..6187132e3f 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/ColorBlindnessTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/ColorBlindnessTest.cs @@ -33,7 +33,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix using (Image image = provider.GetImage()) { image.ColorBlindness(colorBlindness) - .DebugSave(provider, colorBlindness.ToString(), Extensions.Bmp); + .DebugSave(provider, colorBlindness.ToString()); } } @@ -48,7 +48,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.ColorBlindness(colorBlindness, bounds) - .DebugSave(provider, colorBlindness.ToString(), Extensions.Bmp); + .DebugSave(provider, colorBlindness.ToString()); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/HueTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/HueTest.cs index ba1cf2b8f7..f35cad0ee1 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/HueTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/HueTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix using (Image image = provider.GetImage()) { image.Hue(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); } } @@ -41,7 +41,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Hue(value, bounds) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/KodachromeTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/KodachromeTest.cs index 971cdb6d81..d35804f3d6 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/KodachromeTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/KodachromeTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix using (Image image = provider.GetImage()) { image.Kodachrome() - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -34,7 +34,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Kodachrome(bounds) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/LomographTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/LomographTest.cs index 5b41cdb3b7..a805dd336a 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/LomographTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/LomographTest.cs @@ -21,7 +21,7 @@ namespace ImageSharp.Tests using (Image image = provider.GetImage()) { image.Lomograph() - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -36,7 +36,7 @@ namespace ImageSharp.Tests var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Lomograph(bounds) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/PolaroidTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/PolaroidTest.cs index 48f7a6c0a8..eaa1d15c57 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/PolaroidTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/PolaroidTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix using (Image image = provider.GetImage()) { image.Polaroid() - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -34,7 +34,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Polaroid(bounds) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/SaturationTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/SaturationTest.cs index a4a4f3bb51..2182cd3a70 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/SaturationTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/SaturationTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix using (Image image = provider.GetImage()) { image.Saturation(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); } } @@ -41,7 +41,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Saturation(value, bounds) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/ColorMatrix/SepiaTest.cs b/tests/ImageSharp.Tests/Processing/ColorMatrix/SepiaTest.cs index af554e30d8..d104f0aa87 100644 --- a/tests/ImageSharp.Tests/Processing/ColorMatrix/SepiaTest.cs +++ b/tests/ImageSharp.Tests/Processing/ColorMatrix/SepiaTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix using (Image image = provider.GetImage()) { image.Sepia() - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -34,7 +34,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Sepia(bounds) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Convolution/BoxBlurTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/BoxBlurTest.cs index ef049a539a..7316afc50c 100644 --- a/tests/ImageSharp.Tests/Processing/Convolution/BoxBlurTest.cs +++ b/tests/ImageSharp.Tests/Processing/Convolution/BoxBlurTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Convolution using (Image image = provider.GetImage()) { image.BoxBlur(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); } } @@ -41,7 +41,7 @@ namespace ImageSharp.Tests.Processing.Convolution var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.BoxBlur(value, bounds) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs index d5817ab14f..07e10b2c98 100644 --- a/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs +++ b/tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs @@ -35,7 +35,7 @@ namespace ImageSharp.Tests.Processing.Convolution using (Image image = provider.GetImage()) { image.DetectEdges(detector) - .DebugSave(provider, detector.ToString(), Extensions.Bmp); + .DebugSave(provider, detector.ToString()); } } @@ -50,7 +50,7 @@ namespace ImageSharp.Tests.Processing.Convolution var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.DetectEdges(detector, bounds) - .DebugSave(provider, detector.ToString(), Extensions.Bmp); + .DebugSave(provider, detector.ToString()); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs index fa4e4b0b6b..c88ee0696d 100644 --- a/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs +++ b/tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Convolution using (Image image = provider.GetImage()) { image.GaussianBlur(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); } } @@ -41,7 +41,7 @@ namespace ImageSharp.Tests.Processing.Convolution var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.GaussianBlur(value, bounds) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs b/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs index d15042ee69..a78cbb0288 100644 --- a/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs +++ b/tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Convolution using (Image image = provider.GetImage()) { image.GaussianSharpen(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); } } @@ -41,7 +41,7 @@ namespace ImageSharp.Tests.Processing.Convolution var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.GaussianSharpen(value, bounds) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Effects/AlphaTest.cs b/tests/ImageSharp.Tests/Processing/Effects/AlphaTest.cs index 34a24e70be..a48717d202 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/AlphaTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/AlphaTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Effects using (Image image = provider.GetImage()) { image.Alpha(value) - .DebugSave(provider, value, Extensions.Png); + .DebugSave(provider, value); } } @@ -41,7 +41,7 @@ namespace ImageSharp.Tests.Processing.Effects var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Alpha(value, bounds) - .DebugSave(provider, value, Extensions.Png); + .DebugSave(provider, value); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Effects/BackgroundColorTest.cs b/tests/ImageSharp.Tests/Processing/Effects/BackgroundColorTest.cs index 63efbf3e73..d2ee690a62 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/BackgroundColorTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/BackgroundColorTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Effects using (Image image = provider.GetImage()) { image.BackgroundColor(NamedColors.HotPink) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -34,7 +34,7 @@ namespace ImageSharp.Tests.Processing.Effects var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.BackgroundColor(NamedColors.HotPink, bounds) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Effects/BrightnessTest.cs b/tests/ImageSharp.Tests/Processing/Effects/BrightnessTest.cs index c3b37705a9..0b5d27bcca 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/BrightnessTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/BrightnessTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Effects using (Image image = provider.GetImage()) { image.Brightness(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); } } @@ -41,7 +41,7 @@ namespace ImageSharp.Tests.Processing.Effects var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Brightness(value, bounds) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); ; } diff --git a/tests/ImageSharp.Tests/Processing/Effects/ContrastTest.cs b/tests/ImageSharp.Tests/Processing/Effects/ContrastTest.cs index 892eb93622..4b5df55338 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/ContrastTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/ContrastTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Effects using (Image image = provider.GetImage()) { image.Contrast(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); } } @@ -41,7 +41,7 @@ namespace ImageSharp.Tests.Processing.Effects var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Contrast(value, bounds) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Effects/InvertTest.cs b/tests/ImageSharp.Tests/Processing/Effects/InvertTest.cs index 3d8b3d1a1f..9dd4d40c71 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/InvertTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/InvertTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Effects using (Image image = provider.GetImage()) { image.Invert() - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -34,7 +34,7 @@ namespace ImageSharp.Tests.Processing.Effects var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Invert(bounds) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs b/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs index 3d0e8f1177..30d6ced309 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests using (Image image = provider.GetImage()) { image.OilPaint(levels, brushSize) - .DebugSave(provider, string.Join("-", levels, brushSize), Extensions.Bmp); + .DebugSave(provider, string.Join("-", levels, brushSize)); } } @@ -41,7 +41,7 @@ namespace ImageSharp.Tests var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.OilPaint(levels, brushSize, bounds) - .DebugSave(provider, string.Join("-", levels, brushSize), Extensions.Bmp); + .DebugSave(provider, string.Join("-", levels, brushSize)); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds, 0.001F); } diff --git a/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs b/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs index 253f1f4598..7feb160432 100644 --- a/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs +++ b/tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Effects using (Image image = provider.GetImage()) { image.Pixelate(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); // Test the neigbouring pixels for (int y = 0; y < image.Height; y += value) @@ -57,7 +57,7 @@ namespace ImageSharp.Tests.Processing.Effects var bounds = new Rectangle(image.Width / 4, image.Height / 4, image.Width / 2, image.Height / 2); image.Pixelate(value, bounds) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); for (int y = 0; y < image.Height; y++) { diff --git a/tests/ImageSharp.Tests/Processing/Overlays/GlowTest.cs b/tests/ImageSharp.Tests/Processing/Overlays/GlowTest.cs index d0633dca59..cd96efb8dc 100644 --- a/tests/ImageSharp.Tests/Processing/Overlays/GlowTest.cs +++ b/tests/ImageSharp.Tests/Processing/Overlays/GlowTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Overlays using (Image image = provider.GetImage()) { image.Glow() - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.Overlays using (Image image = provider.GetImage()) { image.Glow(NamedColors.Orange) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -43,7 +43,7 @@ namespace ImageSharp.Tests.Processing.Overlays using (Image image = provider.GetImage()) { image.Glow(image.Width / 4F) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -58,7 +58,7 @@ namespace ImageSharp.Tests.Processing.Overlays var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Glow(bounds) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Overlays/VignetteTest.cs b/tests/ImageSharp.Tests/Processing/Overlays/VignetteTest.cs index 56fcf0ee0d..98f198de44 100644 --- a/tests/ImageSharp.Tests/Processing/Overlays/VignetteTest.cs +++ b/tests/ImageSharp.Tests/Processing/Overlays/VignetteTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Overlays using (Image image = provider.GetImage()) { image.Vignette() - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.Overlays using (Image image = provider.GetImage()) { image.Vignette(NamedColors.Orange) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -43,7 +43,7 @@ namespace ImageSharp.Tests.Processing.Overlays using (Image image = provider.GetImage()) { image.Vignette(image.Width / 4F, image.Height / 4F) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } @@ -58,7 +58,7 @@ namespace ImageSharp.Tests.Processing.Overlays var bounds = new Rectangle(10, 10, image.Width / 2, image.Height / 2); image.Vignette(bounds) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds); } diff --git a/tests/ImageSharp.Tests/Processing/Transforms/AutoOrientTests.cs b/tests/ImageSharp.Tests/Processing/Transforms/AutoOrientTests.cs index 7bc0c8bb52..b0ff28b3c6 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/AutoOrientTests.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/AutoOrientTests.cs @@ -39,9 +39,9 @@ namespace ImageSharp.Tests.Processing.Transforms image.MetaData.ExifProfile.SetValue(ExifTag.Orientation, orientation); image.RotateFlip(rotateType, flipType) - .DebugSave(provider, string.Join("_", rotateType, flipType, orientation, "1_before"), Extensions.Bmp) + .DebugSave(provider, string.Join("_", rotateType, flipType, orientation, "1_before")) .AutoOrient() - .DebugSave(provider, string.Join("_", rotateType, flipType, orientation, "2_after"), Extensions.Bmp); + .DebugSave(provider, string.Join("_", rotateType, flipType, orientation, "2_after")); } } } diff --git a/tests/ImageSharp.Tests/Processing/Transforms/CropTest.cs b/tests/ImageSharp.Tests/Processing/Transforms/CropTest.cs index ca20abf790..2103866cbe 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/CropTest.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/CropTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Transforms using (Image image = provider.GetImage()) { image.Crop(image.Width / 2, image.Height / 2) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); } } } diff --git a/tests/ImageSharp.Tests/Processing/Transforms/EntropyCropTest.cs b/tests/ImageSharp.Tests/Processing/Transforms/EntropyCropTest.cs index 24febd5b2f..3c69b8dfbd 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/EntropyCropTest.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/EntropyCropTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Transforms using (Image image = provider.GetImage()) { image.EntropyCrop(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); } } } diff --git a/tests/ImageSharp.Tests/Processing/Transforms/FlipTests.cs b/tests/ImageSharp.Tests/Processing/Transforms/FlipTests.cs index 45ab1e5f8b..bcd391b2e1 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/FlipTests.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/FlipTests.cs @@ -30,7 +30,7 @@ namespace ImageSharp.Tests.Processing.Transforms using (Image image = provider.GetImage()) { image.Flip(flipType) - .DebugSave(provider, flipType, Extensions.Bmp); + .DebugSave(provider, flipType); } } } diff --git a/tests/ImageSharp.Tests/Processing/Transforms/PadTest.cs b/tests/ImageSharp.Tests/Processing/Transforms/PadTest.cs index 7caa1e7c0e..abde1e13ec 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/PadTest.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/PadTest.cs @@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Transforms using (Image image = provider.GetImage()) { image.Pad(image.Width + 50, image.Height + 50) - .DebugSave(provider, null, Extensions.Bmp); + .DebugSave(provider, null); // Check pixels are empty for (int y = 0; y < 25; y++) diff --git a/tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs b/tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs index 9835a3e3aa..0094742365 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs @@ -55,7 +55,7 @@ namespace ImageSharp.Tests.Processing.Transforms var destRectangle = new Rectangle(image.Width / 4, image.Height / 4, image.Width / 2, image.Height / 2); image.Resize(image.Width, image.Height, sampler, sourceRectangle, destRectangle, false) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } @@ -67,7 +67,7 @@ namespace ImageSharp.Tests.Processing.Transforms using (Image image = provider.GetImage()) { image.Resize(image.Width / 3, 0, sampler, false) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } @@ -79,7 +79,7 @@ namespace ImageSharp.Tests.Processing.Transforms using (Image image = provider.GetImage()) { image.Resize(0, image.Height / 3, sampler, false) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } @@ -97,7 +97,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; image.Resize(options) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } @@ -115,7 +115,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; image.Resize(options) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } @@ -134,7 +134,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; image.Resize(options) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } @@ -153,7 +153,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; image.Resize(options) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } @@ -172,7 +172,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; image.Resize(options) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } @@ -191,7 +191,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; image.Resize(options) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } @@ -210,7 +210,7 @@ namespace ImageSharp.Tests.Processing.Transforms }; image.Resize(options) - .DebugSave(provider, name, Extensions.Bmp); + .DebugSave(provider, name); } } diff --git a/tests/ImageSharp.Tests/Processing/Transforms/RotateFlipTests.cs b/tests/ImageSharp.Tests/Processing/Transforms/RotateFlipTests.cs index f85ef6f13a..67305a72fc 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/RotateFlipTests.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/RotateFlipTests.cs @@ -32,7 +32,7 @@ namespace ImageSharp.Tests.Processing.Transforms using (Image image = provider.GetImage()) { image.RotateFlip(rotateType, flipType) - .DebugSave(provider, string.Join("_", rotateType, flipType), Extensions.Bmp); + .DebugSave(provider, string.Join("_", rotateType, flipType)); } } } diff --git a/tests/ImageSharp.Tests/Processing/Transforms/RotateTests.cs b/tests/ImageSharp.Tests/Processing/Transforms/RotateTests.cs index 1f18564290..dee13dcbd9 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/RotateTests.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/RotateTests.cs @@ -36,7 +36,7 @@ namespace ImageSharp.Tests.Processing.Transforms using (Image image = provider.GetImage()) { image.Rotate(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); } } @@ -48,7 +48,7 @@ namespace ImageSharp.Tests.Processing.Transforms using (Image image = provider.GetImage()) { image.Rotate(value) - .DebugSave(provider, value, Extensions.Bmp); + .DebugSave(provider, value); } } } diff --git a/tests/ImageSharp.Tests/Processing/Transforms/SkewTest.cs b/tests/ImageSharp.Tests/Processing/Transforms/SkewTest.cs index f2c2d7cbd2..3b7b522bd8 100644 --- a/tests/ImageSharp.Tests/Processing/Transforms/SkewTest.cs +++ b/tests/ImageSharp.Tests/Processing/Transforms/SkewTest.cs @@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Transforms using (Image image = provider.GetImage()) { image.Skew(x, y) - .DebugSave(provider, string.Join("_", x, y), Extensions.Bmp); + .DebugSave(provider, string.Join("_", x, y)); } } } diff --git a/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs b/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs index 11314d0cb8..928775f467 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs +++ b/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs @@ -24,9 +24,10 @@ namespace ImageSharp.Tests /// The image provider /// The settings /// The extension - public static Image DebugSave(this Image image, ITestImageProvider provider, object settings = null, string extension = "png") + public static Image DebugSave(this Image image, ITestImageProvider provider, object settings = null/*, string extension = "png"*/) where TPixel : struct, IPixel { + string extension = "png"; if (TestEnvironment.RunsOnCI) { return image;