[
https://issues.apache.org/jira/browse/PDFBOX-2096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14009604#comment-14009604
]
Tilman Hausherr commented on PDFBOX-2096:
-----------------------------------------
The good news is that this is fixed in the unreleased 2.0 version. Re the 1.8
version - I could of course make the change you mention (and that makes sense
to me) but I'd need to see if this change breaks anything else.
> ICC profile ignored if number of components is 1
> ------------------------------------------------
>
> Key: PDFBOX-2096
> URL: https://issues.apache.org/jira/browse/PDFBOX-2096
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.8.5
> Reporter: Dominic Tubach
> Fix For: 2.0.0
>
> Attachments: sample.pdf, with_profile.png, without_profile.png
>
>
> The method getRGBImage in PDPixelMap ignores the ICC profile of an ICCBased
> color space if the number of components is 1 (ll. 320-321 in 1.8.5):
> {code}
> byte[] map = new byte[] {(byte)0xff};
> cm = new IndexColorModel(bpc, 1, map, map, map, Transparency.OPAQUE);
> {code}
> This gives me a blank image in my PDF.
> If I use the code in l. 325
> {code}
> cm = colorspace.createColorModel( bpc );
> {code}
> I get the expected result.
> I'm sorry that I'm not allowed to attach the affected PDF. If required I
> would try to generate a different one.
--
This message was sent by Atlassian JIRA
(v6.2#6252)