[
https://issues.apache.org/jira/browse/PDFBOX-2917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14669889#comment-14669889
]
John Hewson commented on PDFBOX-2917:
-------------------------------------
I'm surprised that the three methods which Tilman tried are producing different
results, especially with g.drawImage(). I think we might be looking at either
some odd behaviour in ColorConvertOp which isn't doing what I expected, or
perhaps a bug in ColorConvertOp itself (it wouldn't be the first).
Some experimenting seems to indicate that the difference in color is due to
treating linear RGB values as sRGB, which makes me think that the final step of
the color transform is going wrong somehow. We could try rendering to a linear
RGB destination image instead of sRGB.
> PDF to Image, faint/dim Images
> ------------------------------
>
> Key: PDFBOX-2917
> URL: https://issues.apache.org/jira/browse/PDFBOX-2917
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.0
> Environment: Windows 8.1, jdk1.8.0_51, jre1.8.0_51
> Reporter: Samuil Goranov
> Priority: Trivial
> Labels: images, newbie
> Attachments: saved0.png, selection.pdf
>
>
> {code:title=pdftoimage.java|borderStyle=solid}
> PDDocument document = null;
> File file = new File("F:\\Projects\\java\\pdfbox\\complete.pdf");
> document = PDDocument.load( file );
> try {
> // retrieve image
> BufferedImage bi = new PDFRenderer(document).renderImageWithDPI(
> 0 , 150, ImageType.RGB );
> File outputfile = new File("saved0.png");
> ImageIO.write(bi, "png", outputfile);
> } catch (IOException e) {
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]