Browse Source

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

main
cosmonaut 5 months ago
parent
commit
6677275bfc
  1. 7
      src/Program.cs

7
src/Program.cs

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

Loading…
Cancel
Save