mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +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];
|
var r = new byte[3];
|
||||||
for (var i = 0; i < 3; i++)
|
for (var i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
r[i] = indexed.ColorTable[x + i];
|
r[i] = indexed.ColorTable[x * 3 + i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
var r = new byte[4];
|
var r = new byte[4];
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
r[i] = indexed.ColorTable[x + i];
|
r[i] = indexed.ColorTable[x * 4 + i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
Reference in New Issue
Block a user