[ 
https://issues.apache.org/jira/browse/PDFBOX-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14583885#comment-14583885
 ] 

Tilman Hausherr commented on PDFBOX-2828:
-----------------------------------------

I don't really understand the problem - only the *300.png image is blurry, 
because it is too small. The other ones are not blurry. (If you display your 
own links with a browser, you have to click on them to see them in 1:1 
resolution).

> 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
>         Attachments: 1_4_resolution_1280.png, 3_4.pdf, 
> 3_4_resolution_1280.png, 3_4_resolution_2000.png, 3_4_resolution_300.png
>
>
> 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.
> {code}
>                     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
> {code}



--
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

Reply via email to