Class: Teaas::Blood
- Inherits:
-
Object
- Object
- Teaas::Blood
- Defined in:
- lib/teaas/blood.rb
Class Method Summary collapse
-
.blood(original_img) ⇒ Magick::ImageList
Takes in an image, and adds blood to it.
-
.blood_from_file(path) ⇒ Magick::ImageList
Takes in a path to an image, and adds blood to it.
Class Method Details
.blood(original_img) ⇒ Magick::ImageList
Takes in an image, and adds blood to it. Best when used with Turboize.turbo to generate multiple rotation speeds.
7 8 9 |
# File 'lib/teaas/blood.rb', line 7 def self.blood(original_img) Overlayer.(original_img, Magick::ImageList.new(Teaas.root + "/img/blood.gif")) end |
.blood_from_file(path) ⇒ Magick::ImageList
Takes in a path to an image, and adds blood to it. Best when used with Turboize.turbo to generate multiple rotation speeds. This is a wrapper around Spin.spin
15 16 17 18 19 20 21 22 23 |
# File 'lib/teaas/blood.rb', line 15 def self.blood_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] blood(img) end |