[
https://issues.apache.org/jira/browse/PDFBOX-2092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14021360#comment-14021360
]
Petr Slaby commented on PDFBOX-2092:
------------------------------------
{quote}
Could you post the code that does this?
{quote}
See the attached PDFBOX-2092.patch. But it is just a quick and dirty test to
see the effect on performance. SampledImageReader creates a packed raster and
fills it in from8bitx(). I have changed just the color space class PDDeviceRGB
to expect the different type of raster, all other color space classes would
need to be adjusted, too. Using PdfToImage at 300 DPI, the original code
renders the page in 6 seconds on my system , while the modified needs 3.8
seconds only.
{quote}
And would this packed raster method also work with an image that has more than
4 color components?
{quote}
Sure. But with your 6 component device-N color space, it is more a question of
what comes out than of what comes in. A packed raster can only hold up to four
8-bit components in integer based buffer, i.e. a banded raster would still need
to come into PDDeviceN#toRGBImage(), but what comes out can be a packed raster
with DirectColorModel. For sure it should not fix a missing image.
> Very slow rendering of scanned document
> ---------------------------------------
>
> Key: PDFBOX-2092
> URL: https://issues.apache.org/jira/browse/PDFBOX-2092
> Project: PDFBox
> Issue Type: Improvement
> Components: Rendering
> Affects Versions: 2.0.0
> Environment: Win7 x64 EN
> JDK6,JDK7,JDK8
> Reporter: Juraj Lonc
> Attachments: PDFBOX-2092.patch, SCAN_20140522_160457490_page2.pdf
>
>
> It takes extremely long to render this file to image.
> Depends on computer but it can take 15s+ to render 1 page.
> When I skip drawing of inserted image /Im0, then rendering is fast. So there
> is something wrong with drawing that image in
> {code}
> PageDrawer.drawImage(Image awtImage, AffineTransform at)
> {code}
> when I comment out line
> {code}
> graphics.drawImage(awtImage, imageTransform, null);
> {code}
> then rendering process takes 6s
--
This message was sent by Atlassian JIRA
(v6.2#6252)