fix palette conversions having empty holes if the color was not encountered

main
cosmonaut 2021-12-09 14:40:09 -08:00
parent f789d5cd7e
commit 6677275bfc
1 changed files with 7 additions and 0 deletions

View File

@ -212,6 +212,13 @@ namespace Palettizer
else else
{ {
palette.AddColor(color); palette.AddColor(color);
var grayscaleColor = palette.ColorToGrayscaleMap[color];
grayscaleImage[i] = grayscaleColor;
grayscaleImage[i + 1] = grayscaleColor;
grayscaleImage[i + 2] = grayscaleColor;
grayscaleImage[i + 3] = color.A;
} }
} }
} }