Tilman Hausherr created PDFBOX-2962:
---------------------------------------
Summary: Handle TIFF predictor for bpc 2 and 4 / optimizing
existing predictor code
Key: PDFBOX-2962
URL: https://issues.apache.org/jira/browse/PDFBOX-2962
Project: PDFBox
Issue Type: Improvement
Components: Rendering
Affects Versions: 1.8.10, 1.8.11, 2.0.0
Reporter: Tilman Hausherr
Assignee: Tilman Hausherr
Priority: Minor
Fix For: 1.8.11, 2.0.0
I created code that will work for TIFF predictors with bpc 2 and 4. Because
there are no test images, the code is written so that it can work with bpc 1,
2, 4 and 8 (but not 16) and has been tested on what we have, which are the
corner cases bpc 1 and 8. The bit sequence retrieval / assignment methods have
tests so the risk is small.
If anyone wants to optimize the new code, it should be retested with the same
method, i.e. disable the (faster) code for bpc 1 and 8. And if it comes out
that optimization went wrong, we'll still have this code as a fallback. However
optimization isn't really needed, almost all files "in the wild" are bpc 8.
I also did some slight optimizations of the existing code, {{p - bytesPerPixel
>= 0 ? ...}} can be removed by starting the for loop at {{bytesPerPixel}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]