[ https://issues.apache.org/jira/browse/PDFBOX-2971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Petr Slaby updated PDFBOX-2971: ------------------------------- Attachment: ExternesDokument_modif.pdf > CalGray white rendered as cyan > ------------------------------ > > Key: PDFBOX-2971 > URL: https://issues.apache.org/jira/browse/PDFBOX-2971 > Project: PDFBox > Issue Type: Bug > Affects Versions: 2.0.0 > Reporter: Petr Slaby > Priority: Minor > Attachments: ExternesDokument_modif.pdf > > > The attached PDF uses CalGray colors. When converted to a jpeg using > PdfToImage, there is a cyan rectangle visible. Acrobat shows the same > rectangle as white. > The PDF uses a CalGray having white point (0.9505, 1, 1.089). The color value > after applying gamma is 1.0, i.e. white was intended. The class PDCalGray > multiplies the value by the white point to get X, Y, Z and sends it to the > java built-in CIEXYZ profile to convert it into sRGB. I believe the problem > is that the white point of CIEXYZ in java is (0.9642, 1.0000, 0.8249) and we > need to adapt the white point before sending the values to it. There are > several methods to do that, but the easiest one is a simple scaling. In our > case it would meant to multiply the color value by the CIEXYZ white point > instead of the white point given in the CalGray. > I would not like to pretend that I am an expert in this area. I found the > information in the internet and in the java sources of ColorSpace and > ICC_ColorSpace and this is how I interpret it. An insight of someone who > really understands the color management stuff would be appreciated. But my > main point is that the result looks different compared to what is shown in > Acrobat. > The PDF originally comes from a customer and contains text above the > rectangles. I have removed the texts. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org