//
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
//
namespace ImageSharp.Tests
{
using System.IO;
using System.Collections.Generic;
///
/// The test base class for reading and writing to files.
///
public abstract class FileTestBase
{
///
/// The collection of image files to test against.
///
protected static readonly List Files = new List
{
//new TestFile(TestImages.Png.P1),
//new TestFile(TestImages.Png.Pd),
new TestFile(TestImages.Jpeg.Floorplan), // Perf: Enable for local testing only
new TestFile(TestImages.Jpeg.Calliphora),
new TestFile(TestImages.Jpeg.Cmyk), // Perf: Enable for local testing only
new TestFile(TestImages.Jpeg.Turtle),
//new TestFile(TestImages.Jpeg.Fb), // Perf: Enable for local testing only
//new TestFile(TestImages.Jpeg.Progress), // Perf: Enable for local testing only
//new TestFile(TestImages.Jpeg.Gamma_dalai_lama_gray). // Perf: Enable for local testing only
new TestFile(TestImages.Bmp.Car),
//new TestFile(TestImages.Bmp.Neg_height), // Perf: Enable for local testing only
//new TestFile(TestImages.Png.Blur), // Perf: Enable for local testing only
//new TestFile(TestImages.Png.Indexed), // Perf: Enable for local testing only
new TestFile(TestImages.Png.Splash),
new TestFile(TestImages.Gif.Rings),
//new TestFile(TestImages.Gif.Giphy) // Perf: Enable for local testing only
};
protected string CreateOutputDirectory(string path)
{
path = "TestOutput/" + path;
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
return path;
}
}
}