Class: Teaas::Fire
- Inherits:
-
Object
- Object
- Teaas::Fire
- Defined in:
- lib/teaas/fire.rb
Class Method Summary collapse
-
.fire(original_img) ⇒ Magick::ImageList
Takes in an image, and adds flames to it.
-
.fire_from_file(path) ⇒ Magick::ImageList
Takes in a path to an image, and adds flames to it.
Class Method Details
.fire(original_img) ⇒ Magick::ImageList
Takes in an image, and adds flames to it. Best when used with Turboize.turbo to generate multiple rotation speeds.
7 8 9 |
# File 'lib/teaas/fire.rb', line 7 def self.fire(original_img) Overlayer.(original_img, Magick::ImageList.new(Teaas.root + "/img/fire.gif")) end |
.fire_from_file(path) ⇒ Magick::ImageList
Takes in a path to an image, and adds flames to it. Best when used with Turboize.turbo to generate multiple rotation speeds. This is a wrapper around Blood.blood
15 16 17 18 19 20 21 22 23 |
# File 'lib/teaas/fire.rb', line 15 def self.fire_from_file(path) img = Magick::ImageList.new # Grab the first element in array to prevent strange things when an # animated image is submitted img.read(path)[0] fire(img) end |