Lori created PDFBOX-2828:
----------------------------
Summary: Blurred Images using PDFBox 2.0
Key: PDFBOX-2828
URL: https://issues.apache.org/jira/browse/PDFBOX-2828
Project: PDFBox
Issue Type: Improvement
Components: Rendering
Affects Versions: 2.0.0
Reporter: Lori
PNG images generated from PDF are blurry. I've tried a variety of resolutions
including default. (The code adjust scale so that the max of width or height
equals the resolution). Any help appreciated - I am new to image processing
so I apologize if I've missing something blatant.
PDPage page = doc.getPage(i);
PDRectangle cropbBox = page.getCropBox();
float widthPt = cropbBox.getWidth();
float heightPt = cropbBox.getHeight();
float max = Math.max(widthPt, heightPt);
float scale = resolution/max;
//int widthPx = Math.round(widthPt * scale);
//nt heightPx = Math.round(heightPt * scale);
BufferedImage image = renderer.renderImage(i, scale);//300
pixels/inches 1/72 inches/pt
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]