Browse Source
Merge branch 'master' into jpeg-encoder-optimization
pull/1761/head
James Jackson-South
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
25 additions and
0 deletions
-
ImageSharp.sln
-
tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs
-
tests/ImageSharp.Tests/TestImages.cs
-
tests/Images/Input/Png/issues/Issue_1765_Net6DeflateStreamRead.png
|
|
|
@ -403,6 +403,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "issues", "issues", "{670DD4 |
|
|
|
tests\Images\Input\Png\issues\Issue_1127.png = tests\Images\Input\Png\issues\Issue_1127.png |
|
|
|
tests\Images\Input\Png\issues\Issue_1177_1.png = tests\Images\Input\Png\issues\Issue_1177_1.png |
|
|
|
tests\Images\Input\Png\issues\Issue_1177_2.png = tests\Images\Input\Png\issues\Issue_1177_2.png |
|
|
|
tests\Images\Input\Png\issues\Issue_1765_Net6DeflateStreamRead.png = tests\Images\Input\Png\issues\Issue_1765_Net6DeflateStreamRead.png |
|
|
|
tests\Images\Input\Png\issues\Issue_410.png = tests\Images\Input\Png\issues\Issue_410.png |
|
|
|
tests\Images\Input\Png\issues\Issue_935.png = tests\Images\Input\Png\issues\Issue_935.png |
|
|
|
EndProjectSection |
|
|
|
|
|
|
|
@ -368,6 +368,24 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png |
|
|
|
Assert.Null(ex); |
|
|
|
} |
|
|
|
|
|
|
|
// https://github.com/SixLabors/ImageSharp/issues/1765
|
|
|
|
[Theory] |
|
|
|
[WithFile(TestImages.Png.Issue1765_Net6DeflateStreamRead, PixelTypes.Rgba32)] |
|
|
|
public void Issue1765<TPixel>(TestImageProvider<TPixel> provider) |
|
|
|
where TPixel : unmanaged, IPixel<TPixel> |
|
|
|
{ |
|
|
|
System.Exception ex = Record.Exception( |
|
|
|
() => |
|
|
|
{ |
|
|
|
using (Image<TPixel> image = provider.GetImage(PngDecoder)) |
|
|
|
{ |
|
|
|
image.DebugSave(provider); |
|
|
|
image.CompareToOriginal(provider, ImageComparer.Exact); |
|
|
|
} |
|
|
|
}); |
|
|
|
Assert.Null(ex); |
|
|
|
} |
|
|
|
|
|
|
|
// https://github.com/SixLabors/ImageSharp/issues/410
|
|
|
|
[Theory] |
|
|
|
[WithFile(TestImages.Png.Bad.Issue410_MalformedApplePng, PixelTypes.Rgba32)] |
|
|
|
|
|
|
|
@ -111,6 +111,9 @@ namespace SixLabors.ImageSharp.Tests |
|
|
|
// Issue 935: https://github.com/SixLabors/ImageSharp/issues/935
|
|
|
|
public const string Issue935 = "Png/issues/Issue_935.png"; |
|
|
|
|
|
|
|
// Issue 1765: https://github.com/SixLabors/ImageSharp/issues/1765
|
|
|
|
public const string Issue1765_Net6DeflateStreamRead = "Png/issues/Issue_1765_Net6DeflateStreamRead.png"; |
|
|
|
|
|
|
|
public static class Bad |
|
|
|
{ |
|
|
|
public const string MissingDataChunk = "Png/xdtn0g01.png"; |
|
|
|
|
|
|
|
@ -0,0 +1,3 @@ |
|
|
|
version https://git-lfs.github.com/spec/v1 |
|
|
|
oid sha256:86ea14567bcd259d76dc782ee366c23a5755714c6d48f636524b23e75b89e5b6 |
|
|
|
size 775275 |