|
|
@ -361,7 +361,8 @@ namespace ImageSharp.Formats |
|
|
byte[] previousScanline = ArrayPool<byte>.Shared.Rent(this.bytesPerScanline); |
|
|
byte[] previousScanline = ArrayPool<byte>.Shared.Rent(this.bytesPerScanline); |
|
|
byte[] scanline = 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.
|
|
|
// Zero out the scanlines, because the bytes that are rented from the arraypool may not be zero.
|
|
|
|
|
|
Array.Clear(scanline, 0, this.bytesPerScanline); |
|
|
Array.Clear(previousScanline, 0, this.bytesPerScanline); |
|
|
Array.Clear(previousScanline, 0, this.bytesPerScanline); |
|
|
|
|
|
|
|
|
try |
|
|
try |
|
|
@ -437,7 +438,8 @@ namespace ImageSharp.Formats |
|
|
{ |
|
|
{ |
|
|
for (int pass = 0; pass < 7; pass++) |
|
|
for (int pass = 0; pass < 7; pass++) |
|
|
{ |
|
|
{ |
|
|
// Zero out the previousScanline, because the bytes that are rented from the arraypool may not be zero.
|
|
|
// Zero out the scanlines, because the bytes that are rented from the arraypool may not be zero.
|
|
|
|
|
|
Array.Clear(scanline, 0, this.bytesPerScanline); |
|
|
Array.Clear(previousScanline, 0, this.bytesPerScanline); |
|
|
Array.Clear(previousScanline, 0, this.bytesPerScanline); |
|
|
|
|
|
|
|
|
int y = Adam7FirstRow[pass]; |
|
|
int y = Adam7FirstRow[pass]; |
|
|
|