[ https://issues.apache.org/jira/browse/PDFBOX-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13923668#comment-13923668 ]
John Hewson edited comment on PDFBOX-1963 at 3/7/14 12:42 PM: -------------------------------------------------------------- Tilman, {quote} TestPDFToImage \[...] was testing at 96 dpi or screen resolution (the template images are 96 dpi), now it is testing at scale 1, which is currently 72 dpi which is the new default. {quote} This was an oversight, I didn't notice it because TestPDFToImage is disabled and so it didn't break the build. *I've changed it back to 96dpi in revision 1575199*. {quote} The previous default of RenderUtil was 144 dpi. {quote} This was deliberate, the comment in the original method said that it was intended that users would down-scale the image returned, but there are 4x more pixels at a 2x zoom factor, which quickly adds up to much slower performance. Users who know that Java's default DPI is 72 is going to be surprised when the image returned is at 144dpi. *Here's an alternative solution*, why don't we just remove the default {{#renderImage()}} method and rename {{#renderImage(pageIndex,scale)}} to {{#renderImageWithScale(...)}} this will make it impossible for users to be misled into thinking that PDFBox cannot render high-resolution images. It's also obvious to newcomers that {{#renderImageWithScale(1)}} is a good starting point without having to know anything about 72dpi. was (Author: jahewson): Tilman, {quote} TestPDFToImage \[...] was testing at 96 dpi or screen resolution (the template images are 96 dpi), now it is testing at scale 1, which is currently 72 dpi which is the new default. {quote} This was an oversight, I didn't notice it because TestPDFToImage is disabled and so it didn't break the build. *I've changed it back to 96dpi in revision 1575199*. {quote} The previous default of RenderUtil was 144 dpi. This should also be put back. {quote} This was deliberate, the comment in the original method said that it was intended that users would down-scale the image returned, but there are 4x more pixels at a 2x zoom factor, which quickly adds up to much slower performance. Users who know that Java's default DPI is 72 is going to be surprised when the image returned is at 144dpi. *Here's an alternative solution*, why don't we just remove the default {{#renderImage()}} method and rename {{#renderImage(pageIndex,scale)}} to {{#renderImageWithScale(...)}} this will make it impossible for users to be misled into thinking that PDFBox cannot render high-resolution images. It's also obvious to newcomers that {{#renderImageWithScale(1)}} is a good starting point without having to know anything about 72dpi. > PDFImageWriter doesn't make use of PDFStreamEngine > -------------------------------------------------- > > Key: PDFBOX-1963 > URL: https://issues.apache.org/jira/browse/PDFBOX-1963 > Project: PDFBox > Issue Type: Improvement > Components: Utilities > Affects Versions: 2.0.0 > Reporter: John Hewson > Assignee: John Hewson > Fix For: 2.0.0 > > > PDFImageWriter is a subclass of PDFStreamEngine, however it never uses any of > its functionality, the writeImage methods could be marked as static and > behave in the same manner. > The relationship between PDFImageWriter, RenderUtil, and ImageIOUtil no > longer matches its historical origins and needs to be refactored. -- This message was sent by Atlassian JIRA (v6.2#6252)