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