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

Tilman Hausherr commented on PDFBOX-5590:
-----------------------------------------

ok, I see the problem. The jbig2, jpeg and jpx filters are the only ones who 
support subsampling. This is because these are Java ImageIO parameters. So we 
just pass the subsampling parameter to ImageIO. RLE isn't passed to ImageIO.

> Java heap space
> ---------------
>
>                 Key: PDFBOX-5590
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5590
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.28
>            Reporter: liu
>            Priority: Major
>         Attachments: 1-1.jpg, 1.jpg, 2.jpg, test.pdf
>
>
> jvm:
> -Xmx1000M
> -Xms1000M
> -XX:-PrintGCDetails
> -XX:+HeapDumpOnOutOfMemoryError
> -XX:HeapDumpPath=C:\Users\LYCIT\Desktop
> demo:
> public static void main(String[] args) throws IOException {
>               File file = new File("C:\\Users\\LYCIT\\Desktop\\test.pdf");
>               final PDDocument load = PDDocument.load(file, 
> MemoryUsageSetting.setupTempFileOnly(-1)
>                               .setTempDir(new File("D:\\fcs\\test")));
>               PDFRenderer renderer = new PDFRenderer(load);
>               renderer.setSubsamplingAllowed(true);
>               float scale = 1.2f;
>               try {
>                       BufferedImage bufferedImage = renderer.renderImage(0, 
> scale, ImageType.RGB);
>               } catch (Exception e) {
>                       System.out.println(e);
>               }
>       }



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to