Browse Source
Change loop condition to i <= numPixels - 8
Co-authored-by: Günther Foidl <gue@korporal.at>
pull/1830/head
Brian Popow
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/ImageSharp/Formats/Webp/Lossless/LosslessUtils.cs
|
|
|
@ -129,7 +129,7 @@ namespace SixLabors.ImageSharp.Formats.Webp.Lossless |
|
|
|
{ |
|
|
|
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(); |
|
|
|
|