Class: Phantom::SVG::Parser::JPEGReader
- Inherits:
-
AbstractImageReader
- Object
- AbstractImageReader
- Phantom::SVG::Parser::JPEGReader
- Defined in:
- lib/phantom/parser/jpeg_reader.rb
Overview
JPEG reader.
Instance Attribute Summary
Attributes inherited from AbstractImageReader
#frames, #has_animation, #height, #loops, #skip_first, #width
Instance Method Summary collapse
-
#read(path, _options = {}) ⇒ Object
Read jpeg file from path.
Methods inherited from AbstractImageReader
Constructor Details
This class inherits a constructor from Phantom::SVG::Parser::AbstractImageReader
Instance Method Details
#read(path, _options = {}) ⇒ Object
Read jpeg file from path.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/phantom/parser/jpeg_reader.rb', line 13 def read(path, = {}) reset return if path.nil? || path.empty? frame = create_frame(path) @frames << frame @width = "#{frame.width}" @height = "#{frame.height}" end |