Skip to content

Commit 9d9e9f1

Browse files
Merge branch 'main' into main
2 parents 4f9ba15 + 83322e3 commit 9d9e9f1

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,4 +353,15 @@ public void DecodeHang<TPixel>(TestImageProvider<TPixel> provider)
353353
Assert.Equal(65503, image.Width);
354354
Assert.Equal(65503, image.Height);
355355
}
356+
357+
// https://github.com/SixLabors/ImageSharp/issues/2517
358+
[Theory]
359+
[WithFile(TestImages.Jpeg.Issues.Issue2517, PixelTypes.Rgba32)]
360+
public void Issue2517_DecodeWorks<TPixel>(TestImageProvider<TPixel> provider)
361+
where TPixel : unmanaged, IPixel<TPixel>
362+
{
363+
using Image<TPixel> image = provider.GetImage(JpegDecoder.Instance);
364+
image.DebugSave(provider);
365+
image.CompareToOriginal(provider);
366+
}
356367
}

tests/ImageSharp.Tests/TestImages.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ public static class Issues
308308
public const string Issue2478_JFXX = "Jpg/issues/issue-2478-jfxx.jpg";
309309
public const string Issue2564 = "Jpg/issues/issue-2564.jpg";
310310
public const string HangBadScan = "Jpg/issues/Hang_C438A851.jpg";
311+
public const string Issue2517 = "Jpg/issues/issue2517-bad-d7.jpg";
311312

312313
public static class Fuzz
313314
{
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)