Class: Origami::Filter::DCT

Inherits:
Object
  • Object
show all
Includes:
Origami::Filter
Defined in:
lib/origami/filters/dct.rb

Overview

Class representing a Filter used to encode and decode data with DCT (JPEG) compression algorithm.

Defined Under Namespace

Classes: DecodeParms

Instance Method Summary collapse

Constructor Details

#initialize(parameters = {}) ⇒ DCT

Returns a new instance of DCT.



42
43
44
# File 'lib/origami/filters/dct.rb', line 42

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

Instance Method Details

#decode(stream) ⇒ Object

DCTDecode implies that data is a JPEG image container. Just returns the raw JPEG image as is.



54
55
56
# File 'lib/origami/filters/dct.rb', line 54

def decode(stream)
  stream
end

#encode(stream) ⇒ Object



46
47
48
# File 'lib/origami/filters/dct.rb', line 46

def encode(stream)
  stream
end