make it possible to protect an ignored color

This commit is contained in:
HF 2020-03-15 21:11:32 +01:00
parent 1386221ed0
commit eff0d603ff

View File

@ -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) {