mirror of https://github.com/SixLabors/ImageSharp
2 changed files with 38 additions and 16 deletions
@ -0,0 +1,20 @@ |
|||||
|
|
||||
|
namespace ImageSharp.Tests |
||||
|
{ |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
public static class TestImageExtensions |
||||
|
{ |
||||
|
public static void DebugSave<TColor>(this Image<TColor> img, TestImageProvider<TColor> provider, string extension = "png") |
||||
|
where TColor : struct, IPixel<TColor> |
||||
|
{ |
||||
|
if(!bool.TryParse(Environment.GetEnvironmentVariable("CI"), out bool isCI) || !isCI) |
||||
|
{ |
||||
|
// we are running locally then we want to save it out
|
||||
|
provider.Utility.SaveTestOutputFile(img, extension); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue