Browse Source

always DebugSave() png-s

pull/298/head
Anton Firszov 9 years ago
parent
commit
7eca259587
  1. 2
      tests/ImageSharp.Tests/Formats/GeneralFormatTests.cs
  2. 4
      tests/ImageSharp.Tests/Formats/Jpg/BadEofJpegTests.cs
  3. 12
      tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs
  4. 4
      tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs
  5. 4
      tests/ImageSharp.Tests/Processing/Binarization/BinaryThresholdTest.cs
  6. 8
      tests/ImageSharp.Tests/Processing/Binarization/DitherTest.cs
  7. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/BlackWhiteTest.cs
  8. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/ColorBlindnessTest.cs
  9. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/HueTest.cs
  10. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/KodachromeTest.cs
  11. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/LomographTest.cs
  12. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/PolaroidTest.cs
  13. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/SaturationTest.cs
  14. 4
      tests/ImageSharp.Tests/Processing/ColorMatrix/SepiaTest.cs
  15. 4
      tests/ImageSharp.Tests/Processing/Convolution/BoxBlurTest.cs
  16. 4
      tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs
  17. 4
      tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs
  18. 4
      tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs
  19. 4
      tests/ImageSharp.Tests/Processing/Effects/AlphaTest.cs
  20. 4
      tests/ImageSharp.Tests/Processing/Effects/BackgroundColorTest.cs
  21. 4
      tests/ImageSharp.Tests/Processing/Effects/BrightnessTest.cs
  22. 4
      tests/ImageSharp.Tests/Processing/Effects/ContrastTest.cs
  23. 4
      tests/ImageSharp.Tests/Processing/Effects/InvertTest.cs
  24. 4
      tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs
  25. 4
      tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs
  26. 8
      tests/ImageSharp.Tests/Processing/Overlays/GlowTest.cs
  27. 8
      tests/ImageSharp.Tests/Processing/Overlays/VignetteTest.cs
  28. 4
      tests/ImageSharp.Tests/Processing/Transforms/AutoOrientTests.cs
  29. 2
      tests/ImageSharp.Tests/Processing/Transforms/CropTest.cs
  30. 2
      tests/ImageSharp.Tests/Processing/Transforms/EntropyCropTest.cs
  31. 2
      tests/ImageSharp.Tests/Processing/Transforms/FlipTests.cs
  32. 2
      tests/ImageSharp.Tests/Processing/Transforms/PadTest.cs
  33. 20
      tests/ImageSharp.Tests/Processing/Transforms/ResizeTests.cs
  34. 2
      tests/ImageSharp.Tests/Processing/Transforms/RotateFlipTests.cs
  35. 4
      tests/ImageSharp.Tests/Processing/Transforms/RotateTests.cs
  36. 2
      tests/ImageSharp.Tests/Processing/Transforms/SkewTest.cs
  37. 3
      tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs

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

4
tests/ImageSharp.Tests/Formats/Jpg/BadEofJpegTests.cs

@ -35,7 +35,7 @@ namespace ImageSharp.Tests
using (Image<TPixel> image = provider.GetImage())
{
Assert.NotNull(image);
provider.Utility.SaveTestOutputFile(image, "bmp");
image.DebugSave(provider);
}
}
@ -47,7 +47,7 @@ namespace ImageSharp.Tests
using (Image<TPixel> image = provider.GetImage())
{
Assert.NotNull(image);
provider.Utility.SaveTestOutputFile(image, "bmp");
image.DebugSave(provider);
}
}
}

12
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<TPixel>(TestImageProvider<TPixel> provider)
public void DecodeBaselineJpeg<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
using (Image<TPixel> 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<TPixel>(TestImageProvider<TPixel> provider)
public void DecodeProgressiveJpeg<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : struct, IPixel<TPixel>
{
using (Image<TPixel> 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<TPixel>(
public void DecodeGenerated<TPixel>(
TestImageProvider<TPixel> provider,
JpegSubsample subsample,
int quality)
@ -75,7 +75,7 @@ namespace ImageSharp.Tests
// TODO: Automatic image comparers could help here a lot :P
Image<TPixel> mirror = provider.Factory.CreateImage(data);
provider.Utility.TestName += $"_{subsample}_Q{quality}";
provider.Utility.SaveTestOutputFile(mirror, "bmp");
mirror.DebugSave(provider);
}
[Theory]

4
tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs

@ -23,12 +23,12 @@ namespace ImageSharp.Tests
[Theory]
[WithFileCollection(nameof(TestFiles), PixelTypes)]
public void DecodeAndReSave<TPixel>(TestImageProvider<TPixel> imageProvider)
public void Decode<TPixel>(TestImageProvider<TPixel> imageProvider)
where TPixel : struct, IPixel<TPixel>
{
using (Image<TPixel> image = imageProvider.GetImage())
{
imageProvider.Utility.SaveTestOutputFile(image, "bmp");
image.DebugSave(imageProvider);
}
}

4
tests/ImageSharp.Tests/Processing/Binarization/BinaryThresholdTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Binarization
using (Image<TPixel> 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);
}

8
tests/ImageSharp.Tests/Processing/Binarization/DitherTest.cs

@ -39,7 +39,7 @@ namespace ImageSharp.Tests.Processing.Binarization
using (Image<TPixel> 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<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/ColorMatrix/BlackWhiteTest.cs

@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/ColorMatrix/ColorBlindnessTest.cs

@ -33,7 +33,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/ColorMatrix/HueTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/ColorMatrix/KodachromeTest.cs

@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/ColorMatrix/LomographTest.cs

@ -21,7 +21,7 @@ namespace ImageSharp.Tests
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/ColorMatrix/PolaroidTest.cs

@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/ColorMatrix/SaturationTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/ColorMatrix/SepiaTest.cs

@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.ColorMatrix
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/Convolution/BoxBlurTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Convolution
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/Convolution/DetectEdgesTest.cs

@ -35,7 +35,7 @@ namespace ImageSharp.Tests.Processing.Convolution
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/Convolution/GaussianBlurTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Convolution
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/Convolution/GaussianSharpenTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Convolution
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/Effects/AlphaTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Effects
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/Effects/BackgroundColorTest.cs

@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Effects
using (Image<TPixel> image = provider.GetImage())
{
image.BackgroundColor(NamedColors<TPixel>.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<TPixel>.HotPink, bounds)
.DebugSave(provider, null, Extensions.Bmp);
.DebugSave(provider, null);
ImageComparer.EnsureProcessorChangesAreConstrained(source, image, bounds);
}

4
tests/ImageSharp.Tests/Processing/Effects/BrightnessTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Effects
using (Image<TPixel> 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); ;
}

4
tests/ImageSharp.Tests/Processing/Effects/ContrastTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Effects
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/Effects/InvertTest.cs

@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Effects
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/Effects/OilPaintTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests
using (Image<TPixel> 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);
}

4
tests/ImageSharp.Tests/Processing/Effects/PixelateTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Effects
using (Image<TPixel> 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++)
{

8
tests/ImageSharp.Tests/Processing/Overlays/GlowTest.cs

@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Overlays
using (Image<TPixel> image = provider.GetImage())
{
image.Glow()
.DebugSave(provider, null, Extensions.Bmp);
.DebugSave(provider, null);
}
}
@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.Overlays
using (Image<TPixel> image = provider.GetImage())
{
image.Glow(NamedColors<TPixel>.Orange)
.DebugSave(provider, null, Extensions.Bmp);
.DebugSave(provider, null);
}
}
@ -43,7 +43,7 @@ namespace ImageSharp.Tests.Processing.Overlays
using (Image<TPixel> 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);
}

8
tests/ImageSharp.Tests/Processing/Overlays/VignetteTest.cs

@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Overlays
using (Image<TPixel> image = provider.GetImage())
{
image.Vignette()
.DebugSave(provider, null, Extensions.Bmp);
.DebugSave(provider, null);
}
}
@ -31,7 +31,7 @@ namespace ImageSharp.Tests.Processing.Overlays
using (Image<TPixel> image = provider.GetImage())
{
image.Vignette(NamedColors<TPixel>.Orange)
.DebugSave(provider, null, Extensions.Bmp);
.DebugSave(provider, null);
}
}
@ -43,7 +43,7 @@ namespace ImageSharp.Tests.Processing.Overlays
using (Image<TPixel> 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);
}

4
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"));
}
}
}

2
tests/ImageSharp.Tests/Processing/Transforms/CropTest.cs

@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Transforms
using (Image<TPixel> image = provider.GetImage())
{
image.Crop(image.Width / 2, image.Height / 2)
.DebugSave(provider, null, Extensions.Bmp);
.DebugSave(provider, null);
}
}
}

2
tests/ImageSharp.Tests/Processing/Transforms/EntropyCropTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Transforms
using (Image<TPixel> image = provider.GetImage())
{
image.EntropyCrop(value)
.DebugSave(provider, value, Extensions.Bmp);
.DebugSave(provider, value);
}
}
}

2
tests/ImageSharp.Tests/Processing/Transforms/FlipTests.cs

@ -30,7 +30,7 @@ namespace ImageSharp.Tests.Processing.Transforms
using (Image<TPixel> image = provider.GetImage())
{
image.Flip(flipType)
.DebugSave(provider, flipType, Extensions.Bmp);
.DebugSave(provider, flipType);
}
}
}

2
tests/ImageSharp.Tests/Processing/Transforms/PadTest.cs

@ -19,7 +19,7 @@ namespace ImageSharp.Tests.Processing.Transforms
using (Image<TPixel> 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++)

20
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<TPixel> 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<TPixel> 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);
}
}

2
tests/ImageSharp.Tests/Processing/Transforms/RotateFlipTests.cs

@ -32,7 +32,7 @@ namespace ImageSharp.Tests.Processing.Transforms
using (Image<TPixel> image = provider.GetImage())
{
image.RotateFlip(rotateType, flipType)
.DebugSave(provider, string.Join("_", rotateType, flipType), Extensions.Bmp);
.DebugSave(provider, string.Join("_", rotateType, flipType));
}
}
}

4
tests/ImageSharp.Tests/Processing/Transforms/RotateTests.cs

@ -36,7 +36,7 @@ namespace ImageSharp.Tests.Processing.Transforms
using (Image<TPixel> 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<TPixel> image = provider.GetImage())
{
image.Rotate(value)
.DebugSave(provider, value, Extensions.Bmp);
.DebugSave(provider, value);
}
}
}

2
tests/ImageSharp.Tests/Processing/Transforms/SkewTest.cs

@ -26,7 +26,7 @@ namespace ImageSharp.Tests.Processing.Transforms
using (Image<TPixel> image = provider.GetImage())
{
image.Skew(x, y)
.DebugSave(provider, string.Join("_", x, y), Extensions.Bmp);
.DebugSave(provider, string.Join("_", x, y));
}
}
}

3
tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs

@ -24,9 +24,10 @@ namespace ImageSharp.Tests
/// <param name="provider">The image provider</param>
/// <param name="settings">The settings</param>
/// <param name="extension">The extension</param>
public static Image<TPixel> DebugSave<TPixel>(this Image<TPixel> image, ITestImageProvider provider, object settings = null, string extension = "png")
public static Image<TPixel> DebugSave<TPixel>(this Image<TPixel> image, ITestImageProvider provider, object settings = null/*, string extension = "png"*/)
where TPixel : struct, IPixel<TPixel>
{
string extension = "png";
if (TestEnvironment.RunsOnCI)
{
return image;

Loading…
Cancel
Save