From c68ac88f108ec7b7a3798313c92ea5bec7f595ba Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Mon, 5 Dec 2016 07:21:57 +1100 Subject: [PATCH] Fix #9 --- src/ImageSharp/Formats/Png/PngDecoderCore.cs | 6 +++--- tests/ImageSharp.Tests/FileTestBase.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ImageSharp/Formats/Png/PngDecoderCore.cs b/src/ImageSharp/Formats/Png/PngDecoderCore.cs index 587f29a6d8..1337334624 100644 --- a/src/ImageSharp/Formats/Png/PngDecoderCore.cs +++ b/src/ImageSharp/Formats/Png/PngDecoderCore.cs @@ -443,13 +443,13 @@ namespace ImageSharp.Formats byte[] previousScanline = ArrayPool.Shared.Rent(this.bytesPerScanline); byte[] scanline = ArrayPool.Shared.Rent(this.bytesPerScanline); - // Zero out the previousScanline, because the bytes that are rented from the arraypool may not be zero. - Array.Clear(previousScanline, 0, this.bytesPerScanline); - try { for (int pass = 0; pass < 7; pass++) { + // Zero out the previousScanline, because the bytes that are rented from the arraypool may not be zero. + Array.Clear(previousScanline, 0, this.bytesPerScanline); + int y = Adam7FirstRow[pass]; int numColumns = this.ComputeColumnsAdam7(pass); diff --git a/tests/ImageSharp.Tests/FileTestBase.cs b/tests/ImageSharp.Tests/FileTestBase.cs index 33f6307792..e3aa12460b 100644 --- a/tests/ImageSharp.Tests/FileTestBase.cs +++ b/tests/ImageSharp.Tests/FileTestBase.cs @@ -32,7 +32,7 @@ namespace ImageSharp.Tests // new TestFile(TestImages.Png.Blur), // Perf: Enable for local testing only // new TestFile(TestImages.Png.Indexed), // Perf: Enable for local testing only new TestFile(TestImages.Png.Splash), - //new TestFile(TestImages.Png.SplashInterlaced), + new TestFile(TestImages.Png.SplashInterlaced), new TestFile(TestImages.Png.Interlaced), // new TestFile(TestImages.Png.Filter0), // Perf: Enable for local testing only // new TestFile(TestImages.Png.Filter1), // Perf: Enable for local testing only