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.
22 lines
684 B
22 lines
684 B
|
|
namespace ImageSharp.Tests
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
using ImageSharp.PixelFormats;
|
|
|
|
public static class TestImageExtensions
|
|
{
|
|
public static void DebugSave<TPixel>(this Image<TPixel> img, TestImageProvider<TPixel> provider, string extension = "png")
|
|
where TPixel : struct, IPixel<TPixel>
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|