Fix generating a palette overriding a previous pal spec (#1415)

This commit is contained in:
Sylvie
2024-06-25 12:27:01 -04:00
committed by GitHub
parent 240ab8ed1c
commit ed5529d639
3 changed files with 2 additions and 0 deletions

View File

@@ -547,6 +547,7 @@ static void generatePalSpec(Png const &png) {
}
// Fill in the palette spec
options.palSpec.clear();
options.palSpec.emplace_back(); // A single palette, with `#00000000`s (transparent)
assume(options.palSpec.size() == 1);
if (embPalSize > options.maxOpaqueColors()) { // Ignore extraneous colors if they are unused