// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Collections.Generic;
namespace SixLabors.ImageSharp.Tests
{
///
/// The test base class for reading and writing to files.
///
[Obsolete("See: https://github.com/SixLabors/ImageSharp/issues/868")]
public abstract class FileTestBase
{
///
/// TODO: We really should not depend on this! Let's use well defined, test-case specific inputs everywhere!
/// A collection made up of one file for each image format
///
public static IEnumerable DefaultFiles =
new[]
{
TestImages.Bmp.Car,
TestImages.Jpeg.Baseline.Calliphora,
TestImages.Png.Splash,
TestImages.Gif.Trans
};
///
/// A collection of all the bmp test images
///
public static IEnumerable AllBmpFiles = TestImages.Bmp.Benchmark;
///
/// A collection of all the jpeg test images
///
public static IEnumerable AllJpegFiles = TestImages.Jpeg.All;
///
/// A collection of all the png test images
///
public static IEnumerable AllPngFiles = TestImages.Png.All;
///
/// A collection of all the gif test images
///
public static IEnumerable AllGifFiles = TestImages.Gif.All;
///
/// The standard pixel format enumeration
///
public const PixelTypes DefaultPixelType = PixelTypes.Rgba32;
///
/// A few other pixel types to prove that a processor is not bound to a single one.
///
public const PixelTypes CommonNonDefaultPixelTypes = PixelTypes.Rgba32 | PixelTypes.Bgra32 | PixelTypes.RgbaVector;
public static class Extensions
{
public const string Bmp = "bmp";
public const string Jpeg = "jpg";
public const string Png = "png";
public const string Gif = "gif";
}
///
/// The collection of image files to test against.
///
protected static readonly List Files = new List
{
TestFile.Create(TestImages.Jpeg.Baseline.Calliphora),
//TestFile.Create(TestImages.Jpeg.Baseline.Turtle), // Perf: Enable for local testing only
//TestFile.Create(TestImages.Jpeg.Baseline.Ycck), // Perf: Enable for local testing only
//TestFile.Create(TestImages.Jpeg.Baseline.Cmyk), // Perf: Enable for local testing only
//TestFile.Create(TestImages.Jpeg.Baseline.Floorplan), // Perf: Enable for local testing only
//TestFile.Create(TestImages.Jpeg.Progressive.Festzug), // Perf: Enable for local testing only
//TestFile.Create(TestImages.Jpeg.Baseline.Bad.BadEOF), // Perf: Enable for local testing only
//TestFile.Create(TestImages.Jpeg.Baseline.Bad.ExifUndefType), // Perf: Enable for local testing only
//TestFile.Create(TestImages.Jpeg.Progressive.Fb), // Perf: Enable for local testing only
//TestFile.Create(TestImages.Jpeg.Progressive.Progress), // Perf: Enable for local testing only
//TestFile.Create(TestImages.Jpeg.Baseline.GammaDalaiLamaGray), // Perf: Enable for local testing only
//TestFile.Create(TestImages.Jpeg.Progressive.Bad.BadEOF), // Perf: Enable for local testing only
TestFile.Create(TestImages.Bmp.Car),
// TestFile.Create(TestImages.Bmp.NegHeight), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Bmp.CoreHeader), // Perf: Enable for local testing only
TestFile.Create(TestImages.Png.Splash),
// TestFile.Create(TestImages.Png.SnakeGame),
// TestFile.Create(TestImages.Png.Cross), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Bad.ChunkLength1), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Bad.ChunkLength2), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Powerpoint), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Blur), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Indexed), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.SplashInterlaced), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Interlaced), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Filter0), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Filter1), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Filter2), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Filter3), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Filter4), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.FilterVar), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.P1), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Png.Pd), // Perf: Enable for local testing only
TestFile.Create(TestImages.Gif.Rings),
// TestFile.Create(TestImages.Gif.Trans), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Gif.Cheers), // Perf: Enable for local testing only
// TestFile.Create(TestImages.Gif.Giphy) // Perf: Enable for local testing only
};
}
}