[ https://issues.apache.org/jira/browse/PDFBOX-2828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tilman Hausherr updated PDFBOX-2828: ------------------------------------ Description: 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} was: 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 > 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