Class: Teaas::Got
- Inherits:
-
Object
- Object
- Teaas::Got
- Defined in:
- lib/teaas/got.rb
Class Method Summary collapse
-
.got(original_img) ⇒ Magick::ImageList
Best when used with Turboize.turbo to generate multiple rotation speeds.
-
.got_from_file(path) ⇒ Magick::ImageList
Best when used with Turboize.turbo to generate multiple rotation speeds.
Class Method Details
.got(original_img) ⇒ Magick::ImageList
Best when used with Turboize.turbo to generate multiple rotation speeds.
7 8 9 10 |
# File 'lib/teaas/got.rb', line 7 def self.got(original_img) fire_img = Overlayer.(original_img, Magick::ImageList.new(Teaas.root + "/img/fire.gif")) Overlayer.(fire_img, Magick::ImageList.new(Teaas.root + "/img/blood.gif"), :whitelisted_animation => true) end |
.got_from_file(path) ⇒ Magick::ImageList
Best when used with Turboize.turbo to generate multiple rotation speeds. This is a wrapper around got
16 17 18 19 20 21 22 23 24 |
# File 'lib/teaas/got.rb', line 16 def self.got_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] got(img) end |