|
|
@ -50,7 +50,7 @@ namespace SixLabors.ImageSharp.Processing.Processors |
|
|
for (int index = 0; index < colorPalette.Length; index++) |
|
|
for (int index = 0; index < colorPalette.Length; index++) |
|
|
{ |
|
|
{ |
|
|
TPixel temp = colorPalette[index]; |
|
|
TPixel temp = colorPalette[index]; |
|
|
float distance = Vector4.Distance(vector, temp.ToVector4()); |
|
|
float distance = Vector4.DistanceSquared(vector, temp.ToVector4()); |
|
|
|
|
|
|
|
|
if (distance < leastDistance) |
|
|
if (distance < leastDistance) |
|
|
{ |
|
|
{ |
|
|
|