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

John Hewson edited comment on PDFBOX-1963 at 3/7/14 12:38 PM:
--------------------------------------------------------------

Tilman, your suggestion to implement:

{code}
public BufferedImage renderBitonalImage(int pageIndex, int dpi)
{code}

will solve the problem nicely without allowing problematic imageTypes from 
being used. For example, TYPE_IMAGE_BGR would cause all image RGB values to be 
flipped which was the cause of the original problems we had with JPEG slowness.


was (Author: jahewson):
Tilman, regarding imageType:

{quote}
Now that the dpi is back, now please put back the image type.
{quote}

This kind of unconstructive "who moved my cheese?" thinking does not help. The 
problem we are tying to solve and the previous mechanism by which it was solved 
are two separate things.

{quote}
Alternatively implement this:
{quote}

{code}
public BufferedImage renderBitonalImage(int pageIndex, int dpi)
{code}

This is exactly the kinds of thinking we need, and shows why code review can 
work effectively, thanks! I will do this.

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

Reply via email to