From eff0d603ff8ed08c0bf21368e2461be9fc154f88 Mon Sep 17 00:00:00 2001 From: HF Date: Sun, 15 Mar 2020 21:11:32 +0100 Subject: [PATCH] make it possible to protect an ignored color --- src/core/Image.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Image.js b/src/core/Image.js index 1767e54..45e37c3 100644 --- a/src/core/Image.js +++ b/src/core/Image.js @@ -62,7 +62,7 @@ export async function imageABGR2Canvas( const clrY = cOffY + py; if (clrX >= 0 && clrY >= 0 && clrX < width && clrY < height) { const clr = imageData[clrX + clrY * width]; - const clrIndex = (wipe) + const clrIndex = (wipe || protect) ? palette.abgr.indexOf(clr) : palette.abgr.indexOf(clr, 2); if (~clrIndex) {