fix indexing into indexed color space by using table

This commit is contained in:
Eliot Jones 2021-02-08 17:26:25 -04:00
parent 6c293011a2
commit 9fc44f50d2

View File

@ -30,7 +30,7 @@
var r = new byte[3];
for (var i = 0; i < 3; i++)
{
r[i] = indexed.ColorTable[x + i];
r[i] = indexed.ColorTable[x * 3 + i];
}
return r;
@ -43,7 +43,7 @@
var r = new byte[4];
for (int i = 0; i < 4; i++)
{
r[i] = indexed.ColorTable[x + i];
r[i] = indexed.ColorTable[x * 4 + i];
}
return r;