From ed5529d639f23b756adb962f2bce3d13e8ffbff9 Mon Sep 17 00:00:00 2001 From: Sylvie <35663410+Rangi42@users.noreply.github.com> Date: Tue, 25 Jun 2024 12:27:01 -0400 Subject: [PATCH] Fix generating a palette overriding a previous pal spec (#1415) --- src/gfx/process.cpp | 1 + test/gfx/multiple_manual_pals.flags | 1 + test/gfx/multiple_manual_pals.png | Bin 0 -> 118 bytes 3 files changed, 2 insertions(+) create mode 100644 test/gfx/multiple_manual_pals.flags create mode 100644 test/gfx/multiple_manual_pals.png diff --git a/src/gfx/process.cpp b/src/gfx/process.cpp index 630facc46..734af628f 100644 --- a/src/gfx/process.cpp +++ b/src/gfx/process.cpp @@ -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 diff --git a/test/gfx/multiple_manual_pals.flags b/test/gfx/multiple_manual_pals.flags new file mode 100644 index 000000000..17350be21 --- /dev/null +++ b/test/gfx/multiple_manual_pals.flags @@ -0,0 +1 @@ +-c #0094ff,#000,#fff,#0021ff -c embedded diff --git a/test/gfx/multiple_manual_pals.png b/test/gfx/multiple_manual_pals.png new file mode 100644 index 0000000000000000000000000000000000000000..51a7a96a654d0b334fcb036644dc1c9a8d3f56d2 GIT binary patch literal 118 zcmeAS@N?(olHy`uVBq!ia0vp^93afW3?x5a^xFxfcmjMvT>t<7&oJdbgW`Xnz~d{Q zjDeJ@r;B4q#Vykl2YDF`IG8tb->iSmq^j@D*0Q9l%Q)M$_*>1{m+V}%3~>uS9?t}7 OVDNPHb6Mw<&;$T>fF&yc literal 0 HcmV?d00001