|
|
@ -23,9 +23,8 @@ namespace SixLabors.ImageSharp.Tests |
|
|
TestImages.Png.Splash, TestImages.Png.Indexed, |
|
|
TestImages.Png.Splash, TestImages.Png.Indexed, |
|
|
TestImages.Png.FilterVar, |
|
|
TestImages.Png.FilterVar, |
|
|
TestImages.Png.Bad.ChunkLength1, |
|
|
TestImages.Png.Bad.ChunkLength1, |
|
|
TestImages.Png.Bad.ChunkLength2, |
|
|
|
|
|
TestImages.Png.VimImage1, |
|
|
TestImages.Png.VimImage1, |
|
|
TestImages.Png.VimImage2, |
|
|
|
|
|
TestImages.Png.VersioningImage1, |
|
|
TestImages.Png.VersioningImage1, |
|
|
TestImages.Png.VersioningImage2, |
|
|
TestImages.Png.VersioningImage2, |
|
|
|
|
|
|
|
|
@ -34,7 +33,6 @@ namespace SixLabors.ImageSharp.Tests |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static readonly string[] TestImages48Bpp = |
|
|
public static readonly string[] TestImages48Bpp = |
|
|
{ |
|
|
{ |
|
|
TestImages.Png.Rgb48Bpp, |
|
|
TestImages.Png.Rgb48Bpp, |
|
|
@ -43,6 +41,14 @@ namespace SixLabors.ImageSharp.Tests |
|
|
// TestImages.Png.Rgb48BppInterlaced
|
|
|
// TestImages.Png.Rgb48BppInterlaced
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// This is a workaround for Mono-s decoder being incompatible with ours and GDI+.
|
|
|
|
|
|
// We shouldn't mix these with the Interleaved cases (which are also failing with Mono System.Drawing). Let's go AAA!
|
|
|
|
|
|
public static readonly string[] WindowsOnlyTestImages = |
|
|
|
|
|
{ |
|
|
|
|
|
TestImages.Png.Bad.ChunkLength2, |
|
|
|
|
|
TestImages.Png.VimImage2, |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
[Theory] |
|
|
[Theory] |
|
|
[WithFileCollection(nameof(CommonTestImages), PixelTypes.Rgba32)] |
|
|
[WithFileCollection(nameof(CommonTestImages), PixelTypes.Rgba32)] |
|
|
public void Decode<TPixel>(TestImageProvider<TPixel> provider) |
|
|
public void Decode<TPixel>(TestImageProvider<TPixel> provider) |
|
|
@ -55,6 +61,24 @@ namespace SixLabors.ImageSharp.Tests |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// This is a workaround for Mono-s decoder being incompatible with ours and GDI+.
|
|
|
|
|
|
// We shouldn't mix these with the Interleaved cases (which are also failing with Mono System.Drawing). Let's go AAA!
|
|
|
|
|
|
[Theory] |
|
|
|
|
|
[WithFileCollection(nameof(WindowsOnlyTestImages), PixelTypes.Rgba32)] |
|
|
|
|
|
public void Decode_WindowsOnlyTestImages<TPixel>(TestImageProvider<TPixel> provider) |
|
|
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
|
|
{ |
|
|
|
|
|
using (Image<TPixel> image = provider.GetImage(new PngDecoder())) |
|
|
|
|
|
{ |
|
|
|
|
|
image.DebugSave(provider); |
|
|
|
|
|
|
|
|
|
|
|
if (!TestEnvironment.IsLinux) |
|
|
|
|
|
{ |
|
|
|
|
|
image.CompareToOriginal(provider, ImageComparer.Exact); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
[Theory] |
|
|
[Theory] |
|
|
[WithFile(TestImages.Png.Interlaced, PixelTypes.Rgba32)] |
|
|
[WithFile(TestImages.Png.Interlaced, PixelTypes.Rgba32)] |
|
|
public void Decode_Interlaced_DoesNotThrow<TPixel>(TestImageProvider<TPixel> provider) |
|
|
public void Decode_Interlaced_DoesNotThrow<TPixel>(TestImageProvider<TPixel> provider) |
|
|
|