mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
648 B
20 lines
648 B
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|