Browse Source

Update src/ImageSharp/Processing/Processors/Quantization/DefaultPixelSamplingStrategy.cs

Co-authored-by: Günther Foidl <gue@korporal.at>
pull/2269/head
James Jackson-South 4 years ago
committed by GitHub
parent
commit
45a7b8b0d9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/ImageSharp/Processing/Processors/Quantization/DefaultPixelSamplingStrategy.cs

3
src/ImageSharp/Processing/Processors/Quantization/DefaultPixelSamplingStrategy.cs

@ -137,7 +137,8 @@ public class DefaultPixelSamplingStrategy : IPixelSamplingStrategy
for (int pos = 0; pos < totalNumberOfRows; pos++)
{
int subPos = pos % denom;
Debug.Assert(denom > 0);
int subPos = (int)((uint)pos % (uint)denom);
if (subPos < num)
{
yield return GetRow(pos);

Loading…
Cancel
Save