Class: GrabzIt::AnimationOptions
- Inherits:
-
BaseOptions
- Object
- BaseOptions
- GrabzIt::AnimationOptions
- Defined in:
- lib/grabzit/animationoptions.rb
Overview
Represents all of the options available when creating an animated GIF
Instance Method Summary collapse
-
#customWaterMarkId ⇒ String
The custom watermark id.
-
#customWaterMarkId=(value) ⇒ void
Set a custom watermark to add to the animated GIF.
-
#duration ⇒ Integer
The length in seconds of the video that should be converted into a animated GIF.
-
#duration=(value) ⇒ void
Set the length in seconds of the video that should be converted into a animated GIF.
-
#framesPerSecond ⇒ Float
The number of frames per second that should be captured from the video.
-
#framesPerSecond=(value) ⇒ void
Set the number of frames per second that should be captured from the video.
-
#height ⇒ Integer
The height of the resulting animated GIF in pixels.
-
#height=(value) ⇒ void
Set the height of the resulting animated GIF in pixels.
-
#initialize ⇒ AnimationOptions
constructor
A new instance of AnimationOptions.
-
#quality ⇒ Integer
The quality of the animated GIF.
-
#quality=(value) ⇒ void
Set the quality of the image where 0 is poor and 100 excellent.
-
#repeat ⇒ Integer
The number of times to loop the animated GIF.
-
#repeat=(value) ⇒ void
Set the number of times to loop the animated GIF.
-
#reverse ⇒ Boolean
If the frames of the animated GIF should be reversed.
-
#reverse=(value) ⇒ void
Set to true if the frames of the animated GIF should be reversed.
-
#speed ⇒ Float
The speed of the animated GIF.
-
#speed=(value) ⇒ void
Set the speed of the animated GIF from 0.2 to 10 times the original speed.
-
#start ⇒ Integer
The starting position of the video that should be converted into an animated GIF.
-
#start=(value) ⇒ void
Set the starting position of the video that should be converted into an animated GIF.
-
#width ⇒ Integer
The width of the resulting animated GIF in pixels.
-
#width=(value) ⇒ void
Set the width of the resulting animated GIF in pixels.
Methods inherited from BaseOptions
#country, #country=, #customId, #customId=, #encryptionKey, #encryptionKey=, #exportURL, #exportURL=, #proxy, #proxy=
Constructor Details
#initialize ⇒ AnimationOptions
Returns a new instance of AnimationOptions.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# 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 |
Instance Method Details
#customWaterMarkId ⇒ String
Returns the custom watermark id.
127 128 129 |
# File 'lib/grabzit/animationoptions.rb', line 127 def customWaterMarkId @customWaterMarkId end |
#customWaterMarkId=(value) ⇒ void
This method returns an undefined value.
Set a custom watermark to add to the animated GIF
135 136 137 |
# File 'lib/grabzit/animationoptions.rb', line 135 def customWaterMarkId=(value) @customWaterMarkId = value end |
#duration ⇒ Integer
Returns the length in seconds of the video that should be converted into a animated GIF.
62 63 64 |
# File 'lib/grabzit/animationoptions.rb', line 62 def duration @duration end |
#duration=(value) ⇒ void
This method returns an undefined value.
Set the length in seconds of the video that should be converted into a animated GIF
70 71 72 |
# File 'lib/grabzit/animationoptions.rb', line 70 def duration=(value) @duration = value end |
#framesPerSecond ⇒ Float
Returns the number of frames per second that should be captured from the video.
88 89 90 |
# File 'lib/grabzit/animationoptions.rb', line 88 def framesPerSecond @framesPerSecond end |
#framesPerSecond=(value) ⇒ void
This method returns an undefined value.
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
96 97 98 |
# File 'lib/grabzit/animationoptions.rb', line 96 def framesPerSecond=(value) @framesPerSecond = value end |
#height ⇒ Integer
Returns the height of the resulting animated GIF in pixels.
36 37 38 |
# File 'lib/grabzit/animationoptions.rb', line 36 def height @height end |
#height=(value) ⇒ void
This method returns an undefined value.
Set the height of the resulting animated GIF in pixels
44 45 46 |
# File 'lib/grabzit/animationoptions.rb', line 44 def height=(value) @height = value end |
#quality ⇒ Integer
Returns the quality of the animated GIF.
140 141 142 |
# File 'lib/grabzit/animationoptions.rb', line 140 def quality @quality end |
#quality=(value) ⇒ void
This method returns an undefined value.
Set the quality of the image where 0 is poor and 100 excellent. The default is -1 which uses the recommended quality
148 149 150 |
# File 'lib/grabzit/animationoptions.rb', line 148 def quality=(value) @quality = value end |
#repeat ⇒ Integer
Returns the number of times to loop the animated GIF.
101 102 103 |
# File 'lib/grabzit/animationoptions.rb', line 101 def repeat @repeat end |
#repeat=(value) ⇒ void
This method returns an undefined value.
Set the number of times to loop the animated GIF. If 0 it will loop forever
109 110 111 |
# File 'lib/grabzit/animationoptions.rb', line 109 def repeat=(value) @repeat = value end |
#reverse ⇒ Boolean
Returns if the frames of the animated GIF should be reversed.
114 115 116 |
# File 'lib/grabzit/animationoptions.rb', line 114 def reverse @reverse end |
#reverse=(value) ⇒ void
This method returns an undefined value.
Set to true if the frames of the animated GIF should be reversed
122 123 124 |
# File 'lib/grabzit/animationoptions.rb', line 122 def reverse=(value) @reverse = value end |
#speed ⇒ Float
Returns the speed of the animated GIF.
75 76 77 |
# File 'lib/grabzit/animationoptions.rb', line 75 def speed @speed end |
#speed=(value) ⇒ void
This method returns an undefined value.
Set the speed of the animated GIF from 0.2 to 10 times the original speed
83 84 85 |
# File 'lib/grabzit/animationoptions.rb', line 83 def speed=(value) @speed = value end |
#start ⇒ Integer
Returns the starting position of the video that should be converted into an animated GIF.
49 50 51 |
# File 'lib/grabzit/animationoptions.rb', line 49 def start @start end |
#start=(value) ⇒ void
This method returns an undefined value.
Set the starting position of the video that should be converted into an animated GIF
57 58 59 |
# File 'lib/grabzit/animationoptions.rb', line 57 def start=(value) @start = value end |
#width ⇒ Integer
Returns the width of the resulting animated GIF in pixels.
23 24 25 |
# File 'lib/grabzit/animationoptions.rb', line 23 def width @width end |
#width=(value) ⇒ void
This method returns an undefined value.
Set the width of the resulting animated GIF in pixels
31 32 33 |
# File 'lib/grabzit/animationoptions.rb', line 31 def width=(value) @width = value end |