Niels Beekman created PDFBOX-1649:
-------------------------------------
Summary: PNG images with alpha channel displays thin grey lines
Key: PDFBOX-1649
URL: https://issues.apache.org/jira/browse/PDFBOX-1649
Project: PDFBox
Issue Type: Bug
Components: Writing
Affects Versions: 1.8.2
Environment: Microsoft Windows [Version 6.1.7601]
PDFBox 1.8.2
Adobe Reader 10.1.7
Google Chrome 27.0.1453.110 m
Reporter: Niels Beekman
Attachments: screenshot.png, test.pdf, test.png
When including a PNG file in a PDF file, both Adobe Reader and Google Chrome
show thin grey lines. I have attached a screenshot showing the issue.
PDDocument document = new PDDocument();
PDPage page = new PDPage(PDPage.PAGE_SIZE_A4);
document.addPage(page);
BufferedImage buffImage = ImageIO.read(new File("test.png"));
PDPixelMap pixelMap = new PDPixelMap(document, buffImage);
PDPageContentStream contentStream = new PDPageContentStream(document, page);
contentStream.drawImage(pixelMap, 0, 0);
contentStream.close();
document.save(new File("test.pdf"));
This does not happen with a flattened PNG (without alpha channel).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira