Skip to content

Commit 44b124b

Browse files
Add failing test
1 parent 5c28129 commit 44b124b

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,21 @@ public void WebpDecoder_CanDecode_Issue2763<TPixel>(TestImageProvider<TPixel> pr
516516
image.VerifyEncoder(provider, "webp", string.Empty, encoder);
517517
}
518518

519+
// https://github.com/SixLabors/ImageSharp/issues/2801
520+
[Theory]
521+
[WithFile(Lossy.Issue2801, PixelTypes.Rgba32)]
522+
public void WebpDecoder_CanDecode_Issue2801<TPixel>(TestImageProvider<TPixel> provider)
523+
where TPixel : unmanaged, IPixel<TPixel>
524+
{
525+
WebpEncoder encoder = new()
526+
{
527+
};
528+
529+
using Image<TPixel> image = provider.GetImage();
530+
image.DebugSave(provider);
531+
image.VerifyEncoder(provider, "webp", string.Empty, encoder);
532+
}
533+
519534
public static void RunEncodeLossy_WithPeakImage()
520535
{
521536
TestImageProvider<Rgba32> provider = TestImageProvider<Rgba32>.File(TestImageLossyFullPath);

tests/ImageSharp.Tests/TestImages.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,7 @@ public static class Lossy
827827
public const string Issue2257 = "Webp/issues/Issue2257.webp";
828828
public const string Issue2670 = "Webp/issues/Issue2670.webp";
829829
public const string Issue2763 = "Webp/issues/Issue2763.png";
830+
public const string Issue2801 = "Webp/issues/Issue2801.webp";
830831
}
831832
}
832833

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:e90a0d853ddf70d823d8da44eb6c57081e955b1fb7f436a1fd88ca5e5c75a003
3+
size 261212

0 commit comments

Comments
 (0)