phpdftk API Documentation

PredictorFilter
in package

FinalYes

PDF predictor filter — applies/removes PNG and TIFF prediction as specified in ISO 32000-2 §7.4.4.4.

Predictors reduce redundancy in row-based data (e.g., image scanlines) before compression. They are used as a pre-processing step with FlateDecode and LZWDecode.

Predictor values: 1 = No prediction (default) 2 = TIFF Predictor 2 (horizontal differencing) 10 = PNG None 11 = PNG Sub 12 = PNG Up 13 = PNG Average 14 = PNG Paeth 15 = PNG Optimum (per-row selector via tag byte)

Table of Contents

Methods

__construct()  : mixed
decode()  : string
encode()  : string

Methods

__construct()

public __construct([int $predictor = 1 ][, int $columns = 1 ][, int $colors = 1 ][, int $bitsPerComponent = 8 ]) : mixed
Parameters
$predictor : int = 1
$columns : int = 1
$colors : int = 1
$bitsPerComponent : int = 8

decode()

public decode(string $data) : string
Parameters
$data : string
Return values
string

encode()

public encode(string $data) : string
Parameters
$data : string
Return values
string

        
On this page

Search results