PNG image not rendered correctly in PDF if it had transparency (Patrick Valsecchi).

git-svn-id: svn://svn.code.sf.net/p/itextsharp/code/trunk@17 820d3149-562b-4f88-9aa4-a8e61a3485cf
master
psoares33 2008-12-17 11:20:53 +00:00
parent 389916f937
commit c12d0aa854
1 changed files with 1 additions and 2 deletions

View File

@ -751,8 +751,7 @@ namespace iTextSharp.text.pdf.codec {
dstX = xOffset;
for (srcX = 0; srcX < width; srcX++) {
int idx = outp[srcX];
if (idx < trans.Length)
v[0] = (trans[idx] == 0 ? 1 : 0);
v[0] = ((idx < trans.Length && trans[idx] == 0) ? 1 : 0);
SetPixel(smask, v, 0, 1, dstX, y, 1, yStride);
dstX += step;
}