class GrabzIt::AnimationOptions
Represents all of the options available when creating an animated GIF @version 3.0 @author GrabzIt
Public Class Methods
# File lib/grabzit/animationoptions.rb, line 8 def initialize() super() @width = 0 @height = 0 @start = 0 @duration = 1 @speed = 0 @framesPerSecond = 0 @repeat = 0 @reverse = false @customWaterMarkId = nil @quality = -1 end
Public Instance Methods
@!visibility private
# File lib/grabzit/animationoptions.rb, line 166 def _getParameters(applicationKey, sig, callBackURL, dataName, dataValue) params = createParameters(applicationKey, sig, callBackURL, dataName, dataValue) params['width'] = GrabzIt::Utility.nil_int_check(@width) params['height'] = GrabzIt::Utility.nil_int_check(@height) params['duration'] = GrabzIt::Utility.nil_int_check(@duration) params['speed'] = GrabzIt::Utility.nil_float_check(@speed) params['customwatermarkid'] = GrabzIt::Utility.nil_check(@customWaterMarkId) params['start'] = GrabzIt::Utility.nil_int_check(@start) params['fps'] = GrabzIt::Utility.nil_float_check(@framesPerSecond) params['repeat'] = GrabzIt::Utility.nil_int_check(@repeat) params['reverse'] = GrabzIt::Utility.b_to_str(@reverse) params['quality'] = GrabzIt::Utility.nil_int_check(@quality) return params end
@!visibility private
# File lib/grabzit/animationoptions.rb, line 153 def _getSignatureString(applicationSecret, callBackURL, url = nil) items = [applicationSecret] if(url != nil) items.push(GrabzIt::Utility.nil_check(url)) end items.push(GrabzIt::Utility.nil_check(callBackURL),GrabzIt::Utility.nil_int_check(@height),GrabzIt::Utility.nil_int_check(@width),GrabzIt::Utility.nil_check(@customId),GrabzIt::Utility.nil_float_check(@framesPerSecond),GrabzIt::Utility.nil_float_check(@speed),GrabzIt::Utility.nil_int_check(@duration),GrabzIt::Utility.nil_int_check(@repeat),GrabzIt::Utility.b_to_str(@reverse),GrabzIt::Utility.nil_int_check(@start),GrabzIt::Utility.nil_check(@customWaterMarkId),GrabzIt::Utility.nil_check(@country),GrabzIt::Utility.nil_int_check(@quality),GrabzIt::Utility.nil_check(@exportURL),GrabzIt::Utility.nil_check(@encryptionKey),GrabzIt::Utility.nil_check(@proxy)) return items.join("|") end
@return [String] the custom watermark id
# File lib/grabzit/animationoptions.rb, line 127 def customWaterMarkId @customWaterMarkId end
Set a custom watermark to add to the animated GIF
@param value [String] custom watermark id @return [void]
# File lib/grabzit/animationoptions.rb, line 135 def customWaterMarkId=(value) @customWaterMarkId = value end
@return [Integer] the length in seconds of the video that should be converted into a animated GIF
# File lib/grabzit/animationoptions.rb, line 62 def duration @duration end
Set the length in seconds of the video that should be converted into a animated GIF
@param value [Integer] the number of seconds @return [void]
# File lib/grabzit/animationoptions.rb, line 70 def duration=(value) @duration = value end
@return [Float] the number of frames per second that should be captured from the video
# File lib/grabzit/animationoptions.rb, line 88 def framesPerSecond @framesPerSecond end
Set the number of frames per second that should be captured from the video. From a minimum of 0.2 to a maximum of 60
@param value [Float] the number of frames per second @return [void]
# File lib/grabzit/animationoptions.rb, line 96 def framesPerSecond=(value) @framesPerSecond = value end
@return [Integer] the height of the resulting animated GIF in pixels
# File lib/grabzit/animationoptions.rb, line 36 def height @height end
Set the height of the resulting animated GIF in pixels
@param value [Integer] the height @return [void]
# File lib/grabzit/animationoptions.rb, line 44 def height=(value) @height = value end
@return [Integer] the quality of the animated GIF
# File lib/grabzit/animationoptions.rb, line 140 def quality @quality end
Set the quality of the image where 0 is poor and 100 excellent. The default is -1 which uses the recommended quality
@param value [Integer] the custom identifier @return [void]
# File lib/grabzit/animationoptions.rb, line 148 def quality=(value) @quality = value end
@return [Integer] the number of times to loop the animated GIF
# File lib/grabzit/animationoptions.rb, line 101 def repeat @repeat end
Set the number of times to loop the animated GIF. If 0 it will loop forever
@param value [Integer] the number of times to loop @return [void]
# File lib/grabzit/animationoptions.rb, line 109 def repeat=(value) @repeat = value end
@return [Boolean] if the frames of the animated GIF should be reversed
# File lib/grabzit/animationoptions.rb, line 114 def reverse @reverse end
Set to true if the frames of the animated GIF should be reversed
@param value [Boolean] reverse value @return [void]
# File lib/grabzit/animationoptions.rb, line 122 def reverse=(value) @reverse = value end
@return [Float] the speed of the animated GIF
# File lib/grabzit/animationoptions.rb, line 75 def speed @speed end
Set the speed of the animated GIF from 0.2 to 10 times the original speed
@param value [Float] the speed @return [void]
# File lib/grabzit/animationoptions.rb, line 83 def speed=(value) @speed = value end
@return [Integer] the starting position of the video that should be converted into an animated GIF
# File lib/grabzit/animationoptions.rb, line 49 def start @start end
Set the starting position of the video that should be converted into an animated GIF
@param value [Integer] the second to start at @return [void]
# File lib/grabzit/animationoptions.rb, line 57 def start=(value) @start = value end
@return [Integer] the width of the resulting animated GIF in pixels
# File lib/grabzit/animationoptions.rb, line 23 def width @width end
Set the width of the resulting animated GIF in pixels
@param value [Integer] the width @return [void]
# File lib/grabzit/animationoptions.rb, line 31 def width=(value) @width = value end