Skip to content

Commit

Permalink
Remove excess clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
IldarKhayrutdinov committed Feb 14, 2021
1 parent 009a3eb commit c082dc4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public override void CompressStrip(Span<byte> rows, int height)
DebugGuard.IsTrue(rows.Length % height == 0, "Invalid height");
DebugGuard.IsTrue(this.BytesPerRow == rows.Length / height, "The widths must match");

this.pixelData.Clear();
Span<byte> span = this.pixelData.GetSpan();
for (int i = 0; i < height; i++)
{
Expand Down
2 changes: 0 additions & 2 deletions src/ImageSharp/Formats/Tiff/Writers/TiffBiColorWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ protected override void EncodeStrip(int y, int height, TiffBaseCompressor compre
this.pixelsAsGray = this.MemoryAllocator.Allocate<byte>(height * this.Image.Width);
}

this.pixelsAsGray.Clear();

Span<byte> pixelAsGraySpan = this.pixelsAsGray.Slice(0, height * this.Image.Width);

Span<TPixel> pixels = GetStripPixels(this.imageBlackWhite.GetRootFramePixelBuffer(), y, height);
Expand Down

0 comments on commit c082dc4

Please sign in to comment.