class Teaas::No
Public Class Methods
no(original_img)
click to toggle source
Takes in an image, and adds no to it. Best when used with {Teaas::Turboize.turbo} to generate multiple rotation speeds.
@param original_img [Magick::ImageList] The image to be rotated @return [Magick::ImageList] The spinning image
# File lib/teaas/no.rb, line 7 def self.no(original_img) Overlayer.overlay(original_img, Magick::ImageList.new(Teaas.root + "/img/no.png"), :static_on_animated => true, :gravity => Magick::CenterGravity) end
no_from_file(path)
click to toggle source
Takes in a path to an image, and adds no to it. Best when used with {Teaas::Turboize.turbo} to generate multiple rotation speeds. This is a wrapper around {Teaas::Spin.spin}
@param path [String] Path to the image to be spun @return [Magick::ImageList] The spinning image
# File lib/teaas/no.rb, line 15 def self.no_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] no(img) end