mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-04-05 20:55:01 +08:00
fix indexing into indexed color space by using table
This commit is contained in:
parent
6c293011a2
commit
9fc44f50d2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user