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)


45
46
47
# File 'lib/origami/filters/predictors.rb', line 45

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.



53
54
55
# File 'lib/origami/filters/predictors.rb', line 53

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