Class: DynamicPDFApi::GifImageFormat
- Inherits:
-
ImageFormat
- Object
- ImageFormat
- DynamicPDFApi::GifImageFormat
- Defined in:
- lib/ruby_client/Imaging/GifImageFormat.rb
Overview
Represents GIF image format with dithering properties.
Instance Attribute Summary collapse
-
#dithering_algorithm ⇒ Object
Gets or sets the dithering algorithm.
-
#dithering_percent ⇒ Object
Gets or sets the dithering percentage.
Attributes inherited from ImageFormat
Instance Method Summary collapse
-
#initialize ⇒ GifImageFormat
constructor
Initializes a new instance of the GifImageFormat class and sets the image format type to GIF.
-
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the GifImageFormat object.
Constructor Details
#initialize ⇒ GifImageFormat
Initializes a new instance of the GifImageFormat class and sets the image format type to GIF.
14 15 16 17 18 |
# File 'lib/ruby_client/Imaging/GifImageFormat.rb', line 14 def initialize super(ImageFormatType::GIF) @dithering_percent = nil @dithering_algorithm = nil end |
Instance Attribute Details
#dithering_algorithm ⇒ Object
Gets or sets the dithering algorithm.
9 10 11 |
# File 'lib/ruby_client/Imaging/GifImageFormat.rb', line 9 def dithering_algorithm @dithering_algorithm end |
#dithering_percent ⇒ Object
Gets or sets the dithering percentage.
8 9 10 |
# File 'lib/ruby_client/Imaging/GifImageFormat.rb', line 8 def dithering_percent @dithering_percent end |
Instance Method Details
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the GifImageFormat object.
25 26 27 28 29 30 31 |
# File 'lib/ruby_client/Imaging/GifImageFormat.rb', line 25 def to_json( = {}) json_array = {} json_array['ditheringPercent'] = @dithering_percent json_array['ditheringAlgorithm'] = @dithering_algorithm json_array['type'] = 'gif' JSON.pretty_generate(json_array) end |