Jan Maslik
2015-10-13 03:13:51 UTC
Hello,
i would like to report bug of itext library.
iText has wrong interpretation of drawed image into pdf if image has
transparent pixel (argb value = 0 ) .
Image is correct only in case transparent pixels has values (argb =
0xFFFFFF ).
If i save "my" image into png by ImageIO /ImageMagick/PngEncoder , it shows
correctly .
Pasting my wrapped workarround which fixed the issue in case you dont
understand because my english skill.
BufferedImage img = ...
RgbIterator pixIterator =
FastRGB.getIterator(img);
for(int i = 0 ; i < pixIterator.size() ; i++ )
{
if( pixIterator.isTransparent(i) )
{
pixIterator.setARGB(i, 0xFFFFFF );
}
}
i would like to report bug of itext library.
iText has wrong interpretation of drawed image into pdf if image has
transparent pixel (argb value = 0 ) .
Image is correct only in case transparent pixels has values (argb =
0xFFFFFF ).
If i save "my" image into png by ImageIO /ImageMagick/PngEncoder , it shows
correctly .
Pasting my wrapped workarround which fixed the issue in case you dont
understand because my english skill.
BufferedImage img = ...
RgbIterator pixIterator =
FastRGB.getIterator(img);
for(int i = 0 ; i < pixIterator.size() ; i++ )
{
if( pixIterator.isTransparent(i) )
{
pixIterator.setARGB(i, 0xFFFFFF );
}
}