Class: Miso::Processor::GraphicsMagick

Inherits:
ImageMagick show all
Defined in:
lib/miso/processor/graphics_magick.rb

Instance Attribute Summary

Attributes inherited from Miso::Processor

#input_file

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ImageMagick

#_convert, #auto_orient, #crop, #dimensions, #fit, #write

Methods inherited from Miso::Processor

#auto_orient, #crop, #dimensions, #fit, #height, #initialize, #width, #write

Constructor Details

This class inherits a constructor from Miso::Processor

Class Method Details

.available?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/miso/processor/graphics_magick.rb', line 4

def self.available?
  !find_executable('gm').nil?
end

Instance Method Details

#convert(source_path, output_path, options) ⇒ Object



14
15
16
17
# File 'lib/miso/processor/graphics_magick.rb', line 14

def convert(source_path, output_path, options)
  ensure_output_directory(output_path)
  gm "convert '#{source_path}' #{options} '#{output_path}'"
end

#identify(input_file) ⇒ Object



10
11
12
# File 'lib/miso/processor/graphics_magick.rb', line 10

def identify(input_file)
  gm "identify '#{input_file}'"
end