Skip to content

Commit

Permalink
Fix generating a palette overriding a previous pal spec (#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 authored Jun 25, 2024
1 parent 240ab8e commit ed5529d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/gfx/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/gfx/multiple_manual_pals.flags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-c #0094ff,#000,#fff,#0021ff -c embedded
Binary file added test/gfx/multiple_manual_pals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ed5529d

Please # to comment.