Browse Source

Added missing clear for the previousScanline when going to the next pass

pull/315/head
Dirk Lemstra 9 years ago
parent
commit
e6239727a0
  1. 4
      src/ImageSharp/Formats/Png/PngDecoderCore.cs

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

@ -515,7 +515,7 @@ namespace ImageSharp.Formats
this.currentRowBytesRead = 0;
Span<byte> scanSpan = this.scanline.Slice(0, bytesPerInterlaceScanline);
Span<byte> prevSpan = this.previousScanline.Span.Slice(0, bytesPerInterlaceScanline);
Span<byte> prevSpan = this.previousScanline.Slice(0, bytesPerInterlaceScanline);
var filterType = (FilterType)scanSpan[0];
switch (filterType)
@ -556,6 +556,8 @@ namespace ImageSharp.Formats
}
this.pass++;
this.previousScanline.Clear();
if (this.pass < 7)
{
this.currentRow = Adam7FirstRow[this.pass];

Loading…
Cancel
Save