|
|
|
@ -12,68 +12,50 @@ namespace ImageSharp.Tests |
|
|
|
/// </summary>
|
|
|
|
public static class TestImages |
|
|
|
{ |
|
|
|
private static readonly string FormatsDirectory = GetFormatsDirectory(); |
|
|
|
|
|
|
|
private static string GetFormatsDirectory() |
|
|
|
{ |
|
|
|
// Here for code coverage tests.
|
|
|
|
string directory = "TestImages/Formats/"; |
|
|
|
if (Directory.Exists(directory)) |
|
|
|
{ |
|
|
|
return directory; |
|
|
|
} |
|
|
|
return "../../../../TestImages/Formats/"; |
|
|
|
} |
|
|
|
|
|
|
|
public static class Png |
|
|
|
{ |
|
|
|
private static readonly string folder = FormatsDirectory + "Png/"; |
|
|
|
public const string P1 = "Png/pl.png"; |
|
|
|
public const string Pd = "Png/pd.png"; |
|
|
|
public const string Blur = "Png/blur.png"; |
|
|
|
public const string Indexed = "Png/indexed.png"; |
|
|
|
public const string Splash = "Png/splash.png"; |
|
|
|
|
|
|
|
public static TestFile P1 => new TestFile(folder + "pl.png"); |
|
|
|
public static TestFile Pd => new TestFile(folder + "pd.png"); |
|
|
|
public static TestFile Blur => new TestFile(folder + "blur.png"); |
|
|
|
public static TestFile Indexed => new TestFile(folder + "indexed.png"); |
|
|
|
public static TestFile Splash => new TestFile(folder + "splash.png"); |
|
|
|
public const string SplashInterlaced = "Png/splash-interlaced.png"; |
|
|
|
|
|
|
|
public static TestFile SplashInterlaced => new TestFile(folder + "splash-interlaced.png"); |
|
|
|
|
|
|
|
public static TestFile Interlaced => new TestFile(folder + "interlaced.png"); |
|
|
|
public const string Interlaced = "Png/interlaced.png"; |
|
|
|
|
|
|
|
// filtered test images from http://www.schaik.com/pngsuite/pngsuite_fil_png.html
|
|
|
|
public static TestFile Filter0 => new TestFile(folder + "filter0.png"); |
|
|
|
public static TestFile Filter1 => new TestFile(folder + "filter1.png"); |
|
|
|
public static TestFile Filter2 => new TestFile(folder + "filter2.png"); |
|
|
|
public static TestFile Filter3 => new TestFile(folder + "filter3.png"); |
|
|
|
public static TestFile Filter4 => new TestFile(folder + "filter4.png"); |
|
|
|
public const string Filter0 = "Png/filter0.png"; |
|
|
|
public const string Filter1 = "Png/filter1.png"; |
|
|
|
public const string Filter2 = "Png/filter2.png"; |
|
|
|
public const string Filter3 = "Png/filter3.png"; |
|
|
|
public const string Filter4 = "Png/filter4.png"; |
|
|
|
|
|
|
|
// filter changing per scanline
|
|
|
|
public static TestFile FilterVar => new TestFile(folder + "filterVar.png"); |
|
|
|
public const string FilterVar = "Png/filterVar.png"; |
|
|
|
} |
|
|
|
|
|
|
|
public static class Jpeg |
|
|
|
{ |
|
|
|
private static readonly string folder = FormatsDirectory + "Jpg/"; |
|
|
|
|
|
|
|
public static TestFile Cmyk => new TestFile(folder + "cmyk.jpg"); |
|
|
|
public static TestFile Exif => new TestFile(folder + "exif.jpg"); |
|
|
|
public static TestFile Floorplan => new TestFile(folder + "Floorplan.jpg"); |
|
|
|
public static TestFile Calliphora => new TestFile(folder + "Calliphora.jpg"); |
|
|
|
public static TestFile Ycck => new TestFile(folder + "ycck.jpg"); |
|
|
|
public static TestFile Turtle => new TestFile(folder + "turtle.jpg"); |
|
|
|
public static TestFile Fb => new TestFile(folder + "fb.jpg"); |
|
|
|
public static TestFile Progress => new TestFile(folder + "progress.jpg"); |
|
|
|
public static TestFile GammaDalaiLamaGray => new TestFile(folder + "gamma_dalai_lama_gray.jpg"); |
|
|
|
|
|
|
|
public static TestFile Festzug => new TestFile(folder + "Festzug.jpg"); |
|
|
|
public static TestFile Hiyamugi => new TestFile(folder + "Hiyamugi.jpg"); |
|
|
|
|
|
|
|
public static TestFile Jpeg400 => new TestFile(folder + "baseline/jpeg400jfif.jpg"); |
|
|
|
public static TestFile Jpeg420 => new TestFile(folder + "baseline/jpeg420exif.jpg"); |
|
|
|
public static TestFile Jpeg422 => new TestFile(folder + "baseline/jpeg422jfif.jpg"); |
|
|
|
public static TestFile Jpeg444 => new TestFile(folder + "baseline/jpeg444.jpg"); |
|
|
|
|
|
|
|
|
|
|
|
public static readonly TestFile[] All = { |
|
|
|
public const string Cmyk = "Jpg/cmyk.jpg"; |
|
|
|
public const string Exif = "Jpg/exif.jpg"; |
|
|
|
public const string Floorplan = "Jpg/Floorplan.jpg"; |
|
|
|
public const string Calliphora = "Jpg/Calliphora.jpg"; |
|
|
|
public const string Ycck = "Jpg/ycck.jpg"; |
|
|
|
public const string Turtle = "Jpg/turtle.jpg"; |
|
|
|
public const string Fb = "Jpg/fb.jpg"; |
|
|
|
public const string Progress ="Jpg/progress.jpg"; |
|
|
|
public const string GammaDalaiLamaGray = "Jpg/gamma_dalai_lama_gray.jpg"; |
|
|
|
|
|
|
|
public const string Festzug = "Jpg/Festzug.jpg"; |
|
|
|
public const string Hiyamugi = "Jpg/Hiyamugi.jpg"; |
|
|
|
|
|
|
|
public const string Jpeg400 = "Jpg/baseline/jpeg400jfif.jpg"; |
|
|
|
public const string Jpeg420 = "Jpg/baseline/jpeg420exif.jpg"; |
|
|
|
public const string Jpeg422 = "Jpg/baseline/jpeg422jfif.jpg"; |
|
|
|
public const string Jpeg444 = "Jpg/baseline/jpeg444.jpg"; |
|
|
|
|
|
|
|
public static readonly string[] All = { |
|
|
|
Cmyk, Exif, Floorplan, Calliphora, Turtle, Fb, Progress, GammaDalaiLamaGray, |
|
|
|
Festzug, Hiyamugi, |
|
|
|
Jpeg400, Jpeg420, Jpeg444, |
|
|
|
@ -82,27 +64,23 @@ namespace ImageSharp.Tests |
|
|
|
|
|
|
|
public static class Bmp |
|
|
|
{ |
|
|
|
private static readonly string folder = FormatsDirectory + "Bmp/"; |
|
|
|
|
|
|
|
public static TestFile Car => new TestFile(folder + "Car.bmp"); |
|
|
|
public const string Car = "Bmp/Car.bmp"; |
|
|
|
|
|
|
|
public static TestFile F => new TestFile(folder + "F.bmp"); |
|
|
|
public const string F = "Bmp/F.bmp"; |
|
|
|
|
|
|
|
public static TestFile NegHeight => new TestFile(folder + "neg_height.bmp"); |
|
|
|
public const string NegHeight = "Bmp/neg_height.bmp"; |
|
|
|
|
|
|
|
public static readonly TestFile[] All = { |
|
|
|
public static readonly string[] All = { |
|
|
|
Car, F, NegHeight |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
public static class Gif |
|
|
|
{ |
|
|
|
private static readonly string folder = FormatsDirectory + "Gif/"; |
|
|
|
|
|
|
|
public static TestFile Rings => new TestFile(folder + "rings.gif"); |
|
|
|
public static TestFile Giphy => new TestFile(folder + "giphy.gif"); |
|
|
|
public const string Rings = "Gif/rings.gif"; |
|
|
|
public const string Giphy = "Gif/giphy.gif"; |
|
|
|
|
|
|
|
public static TestFile Cheers => new TestFile(folder + "cheers.gif"); |
|
|
|
public const string Cheers = "Gif/cheers.gif"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|