mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-01-09 14:04:35 +08:00
fix indexing into indexed color space by using table
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user