Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change loop condition to i <= numPixels - 8
Co-authored-by: Günther Foidl <gue@korporal.at>
  • Loading branch information
brianpopow and gfoidl authored Nov 15, 2021
commit b53aab44b36a1d9d6c90457c724d3e53d39d90ba
2 changes: 1 addition & 1 deletion src/ImageSharp/Formats/Webp/Lossless/LosslessUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static void AddGreenToBlueAndRed(Span<uint> pixelData)
{
int numPixels = pixelData.Length;
int i;
for (i = 0; i + 8 <= numPixels; i += 8)
for (i = 0; i <= numPixels - 8; i += 8)
{
ref uint pos = ref Unsafe.Add(ref MemoryMarshal.GetReference(pixelData), i);
Vector256<byte> input = Unsafe.As<uint, Vector256<uint>>(ref pos).AsByte();
Expand Down