Tilman Hausherr created PDFBOX-3763:
---------------------------------------

             Summary: Optimize SampledImageReader.getStencilImage()
                 Key: PDFBOX-3763
                 URL: https://issues.apache.org/jira/browse/PDFBOX-3763
             Project: PDFBox
          Issue Type: Bug
          Components: Rendering
    Affects Versions: 2.0.5
            Reporter: Tilman Hausherr
            Assignee: Tilman Hausherr
             Fix For: 2.0.6, 3.0.0


I have an PDF file (which I can't share, it is p182 of the one from 
https://stackoverflow.com/questions/43248021/pdfbox-2-unusual-memory-consumption
 ) that needs over 3GB for rendering due to two stencil images that are 18694 x 
13214. PDFBox converts stencil images to RGB images, where 1 pixel needs 4 
bytes, so such an image uses 1GB.
After many dead ends over the easter weekend, I realized today that the 
BufferedImage isn't needed at all - we can process the bits directly. 

Memory footprint is down from 3.6GB to 1.7GB and it is faster too.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to