class Teaas::Got

Public Class Methods

got(original_img) click to toggle source

Best when used with {Teaas::Turboize.turbo} to generate multiple rotation speeds.

@param original_img [Magick::ImageList] The original image @return [Magick::ImageList] The resulting image

# File lib/teaas/got.rb, line 7
def self.got(original_img)
  fire_img = Overlayer.overlay(original_img, Magick::ImageList.new(Teaas.root + "/img/fire.gif"))
  Overlayer.overlay(fire_img, Magick::ImageList.new(Teaas.root + "/img/blood.gif"), :whitelisted_animation => true)
end
got_from_file(path) click to toggle source

Best when used with {Teaas::Turboize.turbo} to generate multiple rotation speeds. This is a wrapper around {Teaas::Got.got}

@param path [String] Path to the image to be spun @return [Magick::ImageList] The spinning image

# 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