You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/08/06 00:13:12 UTC

[jira] [Commented] (PDFBOX-2258) SampledImageReader is slow

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

John Hewson commented on PDFBOX-2258:
-------------------------------------

Yes. There might be some loop unrolling that can be done here to speed things along, or a lower-level manipulation of the internal Raster data buffer of the BufferedImage.

Java's built-in gray color space didn't give the correct results, which is why we do the conversion manually. 

> SampledImageReader is slow
> --------------------------
>
>                 Key: PDFBOX-2258
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2258
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.0
>            Reporter: simon steiner
>
> PDF from PDFBOX-1437
> java -jar ~/pdfbox_th/app/target/pdfbox-app-2.0.0-SNAPSHOT.jar PDFToImage AA.pdf
> org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray.toRGBImage()	31.69913	11,472 ms (31.7%)	11,472 ms
> org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getStencilImage()	29.439924	10,654 ms (29.4%)	10,654 ms
> is there some alternative to
>         for (int y = 0; y < height; y++)
>         {
>             for (int x = 0; x < width; x++)
>             {
>                 op
>             }
>         }



--
This message was sent by Atlassian JIRA
(v6.2#6252)