diff --git a/src/ImageSharp/Formats/Webp/Lossy/Vp8EncIterator.cs b/src/ImageSharp/Formats/Webp/Lossy/Vp8EncIterator.cs index eb8d921104..9470a94d95 100644 --- a/src/ImageSharp/Formats/Webp/Lossy/Vp8EncIterator.cs +++ b/src/ImageSharp/Formats/Webp/Lossy/Vp8EncIterator.cs @@ -874,7 +874,7 @@ private void Reset() this.SetCountDown(this.mbw * this.mbh); this.InitTop(); - Array.Clear(this.BitCount, 0, this.BitCount.Length); + Array.Clear(this.BitCount); } /// diff --git a/src/ImageSharp/Formats/Webp/Lossy/Vp8ModeScore.cs b/src/ImageSharp/Formats/Webp/Lossy/Vp8ModeScore.cs index 69841b557e..72a3e971ac 100644 --- a/src/ImageSharp/Formats/Webp/Lossy/Vp8ModeScore.cs +++ b/src/ImageSharp/Formats/Webp/Lossy/Vp8ModeScore.cs @@ -97,11 +97,11 @@ public Vp8ModeScore() public void Clear() { - Array.Clear(this.YDcLevels, 0, this.YDcLevels.Length); - Array.Clear(this.YAcLevels, 0, this.YAcLevels.Length); - Array.Clear(this.UvLevels, 0, this.UvLevels.Length); - Array.Clear(this.ModesI4, 0, this.ModesI4.Length); - Array.Clear(this.Derr, 0, this.Derr.Length); + Array.Clear(this.YDcLevels); + Array.Clear(this.YAcLevels); + Array.Clear(this.UvLevels); + Array.Clear(this.ModesI4); + Array.Clear(this.Derr); } public void InitScore() diff --git a/src/ImageSharp/Formats/Webp/Lossy/YuvConversion.cs b/src/ImageSharp/Formats/Webp/Lossy/YuvConversion.cs index 878bebd105..d0374d637d 100644 --- a/src/ImageSharp/Formats/Webp/Lossy/YuvConversion.cs +++ b/src/ImageSharp/Formats/Webp/Lossy/YuvConversion.cs @@ -159,7 +159,7 @@ private static void UpSampleScalar(Span topY, Span bottomY, Span topY, Span bottomY, Span topU, Span topV, Span curU, Span curV, Span topDst, Span bottomDst, int len, byte[] uvBuffer) { const int xStep = 3; - Array.Clear(uvBuffer, 0, uvBuffer.Length); + Array.Clear(uvBuffer); Span ru = uvBuffer.AsSpan(15); Span rv = ru.Slice(32);