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

John Hewson commented on PDFBOX-1963:
-------------------------------------

Your previous suggestion to use:

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

provides the original benefits I was hoping to gain by the changes I made 
during my refactoring because it prevents the user from passing in arbitrary 
types which are known to cause poor performance e.g. TYPE_INT_BGR, well 
actually any type other than TYPE_BYTE_BINARY, TYPE_BYTE_GRAY, TYPE_INT_RGB or 
TYPE_INT_ARGB.

Doing this for GRAY images too and explicitly naming the A/RGB image methods 
would give us a clean set of methods, say:

{code}
getImageBinary(...)
getImageGray(...)
getImageRGB(...)
getImageARGB(..)

getImageBinaryWithDPI(...)
getImageGrayWithDPI(...)
getImageRGBWithDPI(...)
getImageARGBWithDPI(..)
{code}

How about we go with that?

> 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