Class: DynamicPDFApi::TiffIndexedColorFormat
- Inherits:
-
TiffColorFormat
- Object
- ColorFormat
- TiffColorFormat
- DynamicPDFApi::TiffIndexedColorFormat
- Defined in:
- lib/ruby_client/Imaging/TiffIndexedColorFormat.rb
Overview
Represents indexed color format for TIFF.
Instance Attribute Summary collapse
-
#dithering_algorithm ⇒ Object
Gets or sets the DitheringAlgorithm for TIFF.
-
#dithering_percent ⇒ Object
Gets or sets the dithering percentage for TIFF.
-
#quantization_algorithm ⇒ Object
Gets or sets the QuantizationAlgorithm for TIFF.
Attributes inherited from ColorFormat
Instance Method Summary collapse
-
#initialize ⇒ TiffIndexedColorFormat
constructor
Initializes a new instance of the TiffIndexedColorFormat class with indexed color format type.
-
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the TiffIndexedColorFormat object.
Constructor Details
#initialize ⇒ TiffIndexedColorFormat
Initializes a new instance of the TiffIndexedColorFormat class with indexed color format type.
16 17 18 19 20 21 |
# File 'lib/ruby_client/Imaging/TiffIndexedColorFormat.rb', line 16 def initialize super(ColorFormatType::Indexed) @quantization_algorithm = nil @dithering_percent = nil @dithering_algorithm = nil end |
Instance Attribute Details
#dithering_algorithm ⇒ Object
Gets or sets the DitheringAlgorithm for TIFF.
11 12 13 |
# File 'lib/ruby_client/Imaging/TiffIndexedColorFormat.rb', line 11 def dithering_algorithm @dithering_algorithm end |
#dithering_percent ⇒ Object
Gets or sets the dithering percentage for TIFF.
10 11 12 |
# File 'lib/ruby_client/Imaging/TiffIndexedColorFormat.rb', line 10 def dithering_percent @dithering_percent end |
#quantization_algorithm ⇒ Object
Gets or sets the QuantizationAlgorithm for TIFF.
9 10 11 |
# File 'lib/ruby_client/Imaging/TiffIndexedColorFormat.rb', line 9 def quantization_algorithm @quantization_algorithm end |
Instance Method Details
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the TiffIndexedColorFormat object.
28 29 30 31 32 33 34 35 |
# File 'lib/ruby_client/Imaging/TiffIndexedColorFormat.rb', line 28 def to_json( = {}) json_array = {} json_array['quantizationAlgorithm'] = @quantization_algorithm json_array['ditheringPercent'] = @dithering_percent json_array['ditheringAlgorithm'] = @dithering_algorithm JSON.pretty_generate(json_array) end |