Class: CompositorNode::Engines::ImageMagick
- Inherits:
-
Object
- Object
- CompositorNode::Engines::ImageMagick
- Defined in:
- lib/compositor_node/engines/image_magick.rb
Constant Summary collapse
- MULTIPLY =
::Magick::MultiplyCompositeOp
- OVERLAY =
::Magick::OverlayCompositeOp
Class Method Summary collapse
- .blend(source_a, source_b, x_offset, y_offset, method) ⇒ Object
- .crop(source, x_offset, y_offset, width, height) ⇒ Object
- .height(source) ⇒ Object
- .read(source) ⇒ Object
- .resize(source, width, height) ⇒ Object
- .width(source) ⇒ Object
- .write(source, path) ⇒ Object
Class Method Details
.blend(source_a, source_b, x_offset, y_offset, method) ⇒ Object
30 31 32 |
# File 'lib/compositor_node/engines/image_magick.rb', line 30 def self.blend(source_a, source_b, x_offset, y_offset, method) source_a.composite(source_b, x_offset, y_offset, method) end |
.crop(source, x_offset, y_offset, width, height) ⇒ Object
34 35 36 |
# File 'lib/compositor_node/engines/image_magick.rb', line 34 def self.crop(source, x_offset, y_offset, width, height) source.crop(x_offset, y_offset, width, height) end |
.height(source) ⇒ Object
26 27 28 |
# File 'lib/compositor_node/engines/image_magick.rb', line 26 def self.height(source) source.rows end |
.read(source) ⇒ Object
10 11 12 |
# File 'lib/compositor_node/engines/image_magick.rb', line 10 def self.read(source) ::Magick::ImageList.new(source) end |
.resize(source, width, height) ⇒ Object
18 19 20 |
# File 'lib/compositor_node/engines/image_magick.rb', line 18 def self.resize(source, width, height) source.resize(width, height) end |
.width(source) ⇒ Object
22 23 24 |
# File 'lib/compositor_node/engines/image_magick.rb', line 22 def self.width(source) source.columns end |
.write(source, path) ⇒ Object
14 15 16 |
# File 'lib/compositor_node/engines/image_magick.rb', line 14 def self.write(source, path) source.write(path) end |