Class: GrabzIt::AnimationOptions

Inherits:
BaseOptions show all
Defined in:
lib/grabzit/animationoptions.rb

Overview

Represents all of the options available when creating an animated GIF

Author:

  • GrabzIt

Version:

  • 3.0

Instance Method Summary collapse

Methods inherited from BaseOptions

#country, #country=, #customId, #customId=, #encryptionKey, #encryptionKey=, #exportURL, #exportURL=, #proxy, #proxy=

Constructor Details

#initializeAnimationOptions

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

#customWaterMarkIdString

Returns the custom watermark id.

Returns:

  • (String)

    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

Parameters:

  • value (String)

    custom watermark id



135
136
137
# File 'lib/grabzit/animationoptions.rb', line 135

def customWaterMarkId=(value)
	@customWaterMarkId = value
end

#durationInteger

Returns the length in seconds of the video that should be converted into a animated GIF.

Returns:

  • (Integer)

    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

Parameters:

  • value (Integer)

    the number of seconds



70
71
72
# File 'lib/grabzit/animationoptions.rb', line 70

def duration=(value)
	@duration = value
end

#framesPerSecondFloat

Returns the number of frames per second that should be captured from the video.

Returns:

  • (Float)

    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

Parameters:

  • value (Float)

    the number of frames per second



96
97
98
# File 'lib/grabzit/animationoptions.rb', line 96

def framesPerSecond=(value)
	@framesPerSecond = value
end

#heightInteger

Returns the height of the resulting animated GIF in pixels.

Returns:

  • (Integer)

    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

Parameters:

  • value (Integer)

    the height



44
45
46
# File 'lib/grabzit/animationoptions.rb', line 44

def height=(value)
	@height = value
end

#qualityInteger

Returns the quality of the animated GIF.

Returns:

  • (Integer)

    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

Parameters:

  • value (Integer)

    the custom identifier



148
149
150
# File 'lib/grabzit/animationoptions.rb', line 148

def quality=(value)
	@quality = value
end

#repeatInteger

Returns the number of times to loop the animated GIF.

Returns:

  • (Integer)

    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

Parameters:

  • value (Integer)

    the number of times to loop



109
110
111
# File 'lib/grabzit/animationoptions.rb', line 109

def repeat=(value)
	@repeat = value
end

#reverseBoolean

Returns if the frames of the animated GIF should be reversed.

Returns:

  • (Boolean)

    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

Parameters:

  • value (Boolean)

    reverse value



122
123
124
# File 'lib/grabzit/animationoptions.rb', line 122

def reverse=(value)
	@reverse = value
end

#speedFloat

Returns the speed of the animated GIF.

Returns:

  • (Float)

    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

Parameters:

  • value (Float)

    the speed



83
84
85
# File 'lib/grabzit/animationoptions.rb', line 83

def speed=(value)
	@speed = value
end

#startInteger

Returns the starting position of the video that should be converted into an animated GIF.

Returns:

  • (Integer)

    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

Parameters:

  • value (Integer)

    the second to start at



57
58
59
# File 'lib/grabzit/animationoptions.rb', line 57

def start=(value)
	@start = value
end

#widthInteger

Returns the width of the resulting animated GIF in pixels.

Returns:

  • (Integer)

    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

Parameters:

  • value (Integer)

    the width



31
32
33
# File 'lib/grabzit/animationoptions.rb', line 31

def width=(value)
	@width = value
end