|
|
|
@ -1255,7 +1255,8 @@ internal sealed class PngEncoderCore : IDisposable |
|
|
|
Span<byte> attempt = attemptBuffer.GetSpan(); |
|
|
|
for (int y = 0; y < pixels.Height; y++) |
|
|
|
{ |
|
|
|
this.CollectAndFilterPixelRow(pixels.DangerousGetRowSpan(y), ref filter, ref attempt, quantized, y); |
|
|
|
ReadOnlySpan<TPixel> rowSpan = pixels.DangerousGetRowSpan(y); |
|
|
|
this.CollectAndFilterPixelRow(rowSpan, ref filter, ref attempt, quantized, y); |
|
|
|
deflateStream.Write(filter); |
|
|
|
this.SwapScanlineBuffers(); |
|
|
|
} |
|
|
|
@ -1303,7 +1304,8 @@ internal sealed class PngEncoderCore : IDisposable |
|
|
|
// Encode data
|
|
|
|
// Note: quantized parameter not used
|
|
|
|
// Note: row parameter not used
|
|
|
|
this.CollectAndFilterPixelRow(block, ref filter, ref attempt, null, -1); |
|
|
|
ReadOnlySpan<TPixel> blockSpan = block; |
|
|
|
this.CollectAndFilterPixelRow(blockSpan, ref filter, ref attempt, null, -1); |
|
|
|
deflateStream.Write(filter); |
|
|
|
|
|
|
|
this.SwapScanlineBuffers(); |
|
|
|
|