Browse Source

Fix #9

af/merge-core
James Jackson-South 10 years ago
parent
commit
c68ac88f10
  1. 6
      src/ImageSharp/Formats/Png/PngDecoderCore.cs
  2. 2
      tests/ImageSharp.Tests/FileTestBase.cs

6
src/ImageSharp/Formats/Png/PngDecoderCore.cs

@ -443,13 +443,13 @@ namespace ImageSharp.Formats
byte[] previousScanline = ArrayPool<byte>.Shared.Rent(this.bytesPerScanline);
byte[] scanline = ArrayPool<byte>.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);

2
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

Loading…
Cancel
Save