PredictorDecoder
Overview
PredictorDecoder is a class in Aspose.Pdf FOSS for Java.
PNG and TIFF predictor support for Flate/LZW filters (§7.4.4.4, ISO 32000-1:2008).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
PREDICTOR_NONE | int | Read | No prediction. |
PREDICTOR_TIFF | int | Read | TIFF Predictor 2: horizontal differencing. |
PREDICTOR_PNG_NONE | int | Read | PNG None predictor (per-row filter byte present, but filter is 0). |
PREDICTOR_PNG_SUB | int | Read | PNG Sub predictor. |
PREDICTOR_PNG_UP | int | Read | PNG Up predictor. |
PREDICTOR_PNG_AVERAGE | int | Read | PNG Average predictor. |
PREDICTOR_PNG_PAETH | int | Read | PNG Paeth predictor. |
PREDICTOR_PNG_OPTIMUM | int | Read | PNG Optimum — each row may use a different filter. |
Methods
| Signature | Description |
|---|---|
decode(data: byte[], predictor: int, columns: int, colors: int, bitsPerComponent: int) → byte[] | Decodes predictor-filtered data. |
encode(data: byte[], predictor: int, columns: int, colors: int, bitsPerComponent: int) → byte[] | Encodes data with the specified predictor. |
paethPredictor(a: int, b: int, c: int) → int | Paeth predictor function (PNG specification, RFC 2083). |