Module: Origami::Filter::Predictor

Included in:
Flate, LZW
Defined in:
lib/origami/filters/predictors.rb

Defined Under Namespace

Classes: DecodeParms

Constant Summary collapse

NONE =
1
TIFF =
2
PNG_NONE =
10
PNG_SUB =
11
PNG_UP =
12
PNG_AVERAGE =
13
PNG_PAETH =
14
PNG_OPTIMUM =
15

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(receiver) ⇒ Object

Raises:

  • (TypeError)


48
49
50
# File 'lib/origami/filters/predictors.rb', line 48

def self.included(receiver)
    raise TypeError, "Predictors only applies to Filters" unless receiver.include?(Filter)
end

Instance Method Details

#initialize(parameters = {}) ⇒ Object

Create a new predictive Filter.

parameters

A hash of filter options.



56
57
58
# File 'lib/origami/filters/predictors.rb', line 56

def initialize(parameters = {})
    super(DecodeParms.new(parameters))
end