Browse Source

Update src/ImageSharp/Processing/Processors/Quantization/EuclideanPixelMap{TPixel}.cs

Co-authored-by: Anton Firszov <antonfir@gmail.com>
pull/1654/head
James Jackson-South 5 years ago
committed by GitHub
parent
commit
287c1d6e48
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/Processing/Processors/Quantization/EuclideanPixelMap{TPixel}.cs

2
src/ImageSharp/Processing/Processors/Quantization/EuclideanPixelMap{TPixel}.cs

@ -186,7 +186,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Quantization
[MethodImpl(InliningOptions.ShortMethod)]
private static int GetPaletteIndex(int r, int g, int b, int a)
=> (r << ((IndexBits * 2) + IndexAlphaBits))
=> (r << ((IndexBits << 1) + IndexAlphaBits))
+ (r << (IndexBits + IndexAlphaBits + 1))
+ (g << (IndexBits + IndexAlphaBits))
+ (r << (IndexBits * 2))

Loading…
Cancel
Save