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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
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); |
|
|
|
|