Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.8
-
Patch
Description
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?