Browse Source

fix scalar code

js/color-alpha-handling
Anton Firszov 5 years ago
parent
commit
8fb3393055
  1. 4
      src/ImageSharp/Common/Helpers/SimdUtils.Pack.cs

4
src/ImageSharp/Common/Helpers/SimdUtils.Pack.cs

@ -78,7 +78,7 @@ namespace SixLabors.ImageSharp
ref ByteTuple4 b = ref Unsafe.As<byte, ByteTuple4>(ref MemoryMarshal.GetReference(blueChannel));
ref Rgb24 rgb = ref MemoryMarshal.GetReference(destination);
int count = destination.Length / 4;
int count = redChannel.Length / 4;
for (int i = 0; i < count; i++)
{
ref Rgb24 d0 = ref Unsafe.Add(ref rgb, i * 4);
@ -125,7 +125,7 @@ namespace SixLabors.ImageSharp
ref ByteTuple4 b = ref Unsafe.As<byte, ByteTuple4>(ref MemoryMarshal.GetReference(blueChannel));
ref Rgba32 rgb = ref MemoryMarshal.GetReference(destination);
int count = destination.Length / 4;
int count = redChannel.Length / 4;
destination.Fill(new Rgba32(0, 0, 0, 255));
for (int i = 0; i < count; i++)
{

Loading…
Cancel
Save