diff --git a/RGB.NET.Core/Rendering/Textures/Sampler/AverageColorSampler.cs b/RGB.NET.Core/Rendering/Textures/Sampler/AverageColorSampler.cs index a9a7b86..9ba2cb0 100644 --- a/RGB.NET.Core/Rendering/Textures/Sampler/AverageColorSampler.cs +++ b/RGB.NET.Core/Rendering/Textures/Sampler/AverageColorSampler.cs @@ -1,6 +1,5 @@ using System; using System.Numerics; -using System.Runtime.InteropServices; namespace RGB.NET.Core; @@ -41,7 +40,7 @@ public sealed class AverageColorSampler : ISampler { ReadOnlySpan data = info[y]; - fixed (Color* colorPtr = &MemoryMarshal.GetReference(data)) + fixed (Color* colorPtr = data) { Color* current = colorPtr; for (int i = 0; i < chunks; i++) diff --git a/RGB.NET.Presets/Textures/Sampler/AverageByteSampler.cs b/RGB.NET.Presets/Textures/Sampler/AverageByteSampler.cs index 1cfbdf8..bf5d7c6 100644 --- a/RGB.NET.Presets/Textures/Sampler/AverageByteSampler.cs +++ b/RGB.NET.Presets/Textures/Sampler/AverageByteSampler.cs @@ -1,6 +1,5 @@ using System; using System.Numerics; -using System.Runtime.InteropServices; using RGB.NET.Core; namespace RGB.NET.Presets.Textures.Sampler; @@ -42,7 +41,7 @@ public sealed class AverageByteSampler : ISampler { ReadOnlySpan data = info[y]; - fixed (byte* colorPtr = &MemoryMarshal.GetReference(data)) + fixed (byte* colorPtr = data) { byte* current = colorPtr; for (int i = 0; i < chunks; i++) diff --git a/RGB.NET.Presets/Textures/Sampler/AverageFloatSampler.cs b/RGB.NET.Presets/Textures/Sampler/AverageFloatSampler.cs index dfa3f17..cea8f45 100644 --- a/RGB.NET.Presets/Textures/Sampler/AverageFloatSampler.cs +++ b/RGB.NET.Presets/Textures/Sampler/AverageFloatSampler.cs @@ -1,6 +1,5 @@ using System; using System.Numerics; -using System.Runtime.InteropServices; using RGB.NET.Core; namespace RGB.NET.Presets.Textures.Sampler; @@ -33,7 +32,7 @@ public sealed class AverageFloatSampler : ISampler { ReadOnlySpan data = info[y]; - fixed (float* colorPtr = &MemoryMarshal.GetReference(data)) + fixed (float* colorPtr = data) { float* current = colorPtr; for (int i = 0; i < chunks; i++)