Browse Source

Animated webp sample added to Identify test

pull/1147/head
Lajos Marton 7 years ago
parent
commit
df965137f3
  1. 1
      ImageSharp.sln
  2. 9
      tests/ImageSharp.Tests/Formats/WebP/WebPDecoderTests.cs
  3. 6
      tests/ImageSharp.Tests/TestImages.cs
  4. BIN
      tests/Images/Input/WebP/animated-webp.webp

1
ImageSharp.sln

@ -371,6 +371,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Webp", "Webp", "{983A31E2-5
tests\Images\Input\WebP\alpha_filter_3_method_0.webp = tests\Images\Input\WebP\alpha_filter_3_method_0.webp
tests\Images\Input\WebP\alpha_filter_3_method_1.webp = tests\Images\Input\WebP\alpha_filter_3_method_1.webp
tests\Images\Input\WebP\alpha_no_compression.webp = tests\Images\Input\WebP\alpha_no_compression.webp
tests\Images\Input\WebP\animated-webp.webp = tests\Images\Input\WebP\animated-webp.webp
tests\Images\Input\WebP\bad_palette_index.webp = tests\Images\Input\WebP\bad_palette_index.webp
tests\Images\Input\WebP\big_endian_bug_393.webp = tests\Images\Input\WebP\big_endian_bug_393.webp
tests\Images\Input\WebP\bryce.webp = tests\Images\Input\WebP\bryce.webp

9
tests/ImageSharp.Tests/Formats/WebP/WebPDecoderTests.cs

@ -23,10 +23,11 @@ namespace SixLabors.ImageSharp.Tests.Formats.WebP
};
[Theory]
[InlineData(Lossless.Lossless1, 1000, 307)]
[InlineData(Lossless.Lossless2, 1000, 307)]
[InlineData(Lossy.Alpha.LossyAlpha1, 1000, 307)]
[InlineData(Lossy.Alpha.LossyAlpha2, 1000, 307)]
//[InlineData(Lossless.Lossless1, 1000, 307)]
//[InlineData(Lossless.Lossless2, 1000, 307)]
//[InlineData(Lossy.Alpha.LossyAlpha1, 1000, 307)]
//[InlineData(Lossy.Alpha.LossyAlpha2, 1000, 307)]
[InlineData(Animated.Animated1, 400, 400)]
public void Identify_DetectsCorrectDimensions(string imagePath, int expectedWidth, int expectedHeight)
{
var testFile = TestFile.Create(imagePath);

6
tests/ImageSharp.Tests/TestImages.cs

@ -368,7 +368,11 @@ namespace SixLabors.ImageSharp.Tests
public static class WebP
{
//TODO: actualize it with fresh sample images
public static class Animated
{
public const string Animated1 = "WebP/animated-webp.webp";
}
public static class Lossless
{
public const string Lossless1 = "WebP/lossless1.webp";

BIN
tests/Images/Input/WebP/animated-webp.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Loading…
Cancel
Save