Class: Rabbit::ImageManipulable::GIMP

Inherits:
Base
  • Object
show all
Includes:
SystemRunner
Defined in:
lib/rabbit/image/gimp.rb

Constant Summary collapse

GIMP_COMMANDS =
%w(gimp)
HEADER =
"gimp xcf file"
HEADER_SIZE =
HEADER.size

Constants included from ModuleLoader

ModuleLoader::LOADERS

Instance Attribute Summary

Attributes inherited from Base

#height, #original_height, #original_width, #width

Class Method Summary collapse

Methods included from SystemRunner

run

Methods inherited from Base

#[], #[]=, #draw, #initialize, #keep_ratio, #keep_ratio=, #pixbuf, #resize

Methods included from ModuleLoader

extend_object, #find_loader, #loaders, #push_loader, #unshift_loader

Constructor Details

This class inherits a constructor from Rabbit::ImageManipulable::Base

Class Method Details

.match?(filename) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
20
21
# File 'lib/rabbit/image/gimp.rb', line 17

def match?(filename)
  File.open(filename, "rb") do |f|
    HEADER == f.read(HEADER_SIZE)
  end
end