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