[
https://issues.apache.org/jira/browse/PDFBOX-2030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr resolved PDFBOX-2030.
-------------------------------------
Resolution: Fixed
> Using new PDPixelMap() results in black image in PDF
> ----------------------------------------------------
>
> Key: PDFBOX-2030
> URL: https://issues.apache.org/jira/browse/PDFBOX-2030
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 1.8.4
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Fix For: 1.8.5
>
>
> PDPixelMap.createImageStream() makes the assumption that BPC is 8. This is
> not always correct, and it results in the weird effects described here:
> https://stackoverflow.com/questions/15131067/pdfbox-issues-when-creating-pdf-from-bmp
> https://stackoverflow.com/questions/19422156/converting-printable-to-pdf
> I can confirm this by using GIF files. It happens both with bitonal and color
> GIF files. I have fixed it by using some of my code from the trunk from
> LosslessFactory.createFromImage(). That code is slower and longer, but is
> safer because it avoids making assumptions about the low level data, as in
> the line with "rgbImage.getData().getDataElements()".
> I will also uncomment the "new PDPixelMap" segment in the ImageToPDF examples.
--
This message was sent by Atlassian JIRA
(v6.2#6252)