Class: Identify::Image::GIF

Inherits:
Identify::Image show all
Defined in:
lib/identify.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Identify::Image

#as_hash, formats, identify, inherited, parse

Class Method Details

.handle?(data) ⇒ Boolean

Returns:

  • (Boolean)


127
128
129
# File 'lib/identify.rb', line 127

def self.handle? data
  data.start_with?("GIF89a", "GIF87a")
end

Instance Method Details

#parse(data) ⇒ Object



131
132
133
# File 'lib/identify.rb', line 131

def parse data
  as_hash('gif', *data.unpack("x6vv"))
end