You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Itai Shaked (JIRA)" <ji...@apache.org> on 2018/03/18 08:14:00 UTC

[jira] [Created] (PDFBOX-4156) Possible optimization of SampledImageReader.from8bit by using InterleavedRaster

Itai Shaked created PDFBOX-4156:
-----------------------------------

             Summary: Possible optimization of SampledImageReader.from8bit by using InterleavedRaster
                 Key: PDFBOX-4156
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4156
             Project: PDFBox
          Issue Type: Improvement
          Components: Rendering
    Affects Versions: 2.0.8
            Reporter: Itai Shaked
         Attachments: interleaved_raster.patch

I noticed {{SampledImageReader.from8Bit}} assumed the source data to be interleaved, which means if the target raster uses an interleaved sample model, the data can by directly copied. 

This can save 10-15% of total render time in files with large 8-bit images (tested on samples from PDFBOX-2092 , PDFBOX-3791 and the file "gs-bugzilla690022.pdf" from PDFBOX-4151). 

In PDFBOX-2092 there is a discussion about how the sample model must be Banded, but I couldn't find a place in the code that directly relies on this, and the few tests I have run did not reveal problems. Perhaps the constraint is obsolete, or else it means custom sample models cannot be used? 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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