Browse Source

Add failing test

pull/2823/head
James Jackson-South 1 year ago
parent
commit
44b124b08a
  1. 15
      tests/ImageSharp.Tests/Formats/WebP/WebpEncoderTests.cs
  2. 1
      tests/ImageSharp.Tests/TestImages.cs
  3. 3
      tests/Images/Input/Webp/issues/Issue2801.webp

15
tests/ImageSharp.Tests/Formats/WebP/WebpEncoderTests.cs

@ -516,6 +516,21 @@ public class WebpEncoderTests
image.VerifyEncoder(provider, "webp", string.Empty, encoder);
}
// https://github.com/SixLabors/ImageSharp/issues/2801
[Theory]
[WithFile(Lossy.Issue2801, PixelTypes.Rgba32)]
public void WebpDecoder_CanDecode_Issue2801<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
WebpEncoder encoder = new()
{
};
using Image<TPixel> image = provider.GetImage();
image.DebugSave(provider);
image.VerifyEncoder(provider, "webp", string.Empty, encoder);
}
public static void RunEncodeLossy_WithPeakImage()
{
TestImageProvider<Rgba32> provider = TestImageProvider<Rgba32>.File(TestImageLossyFullPath);

1
tests/ImageSharp.Tests/TestImages.cs

@ -827,6 +827,7 @@ public static class TestImages
public const string Issue2257 = "Webp/issues/Issue2257.webp";
public const string Issue2670 = "Webp/issues/Issue2670.webp";
public const string Issue2763 = "Webp/issues/Issue2763.png";
public const string Issue2801 = "Webp/issues/Issue2801.webp";
}
}

3
tests/Images/Input/Webp/issues/Issue2801.webp

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e90a0d853ddf70d823d8da44eb6c57081e955b1fb7f436a1fd88ca5e5c75a003
size 261212
Loading…
Cancel
Save