Class: DynamicPDFApi::TiffIndexedColorFormat

Inherits:
TiffColorFormat show all
Defined in:
lib/ruby_client/Imaging/TiffIndexedColorFormat.rb

Overview

Represents indexed color format for TIFF.

Instance Attribute Summary collapse

Attributes inherited from ColorFormat

#type

Instance Method Summary collapse

Constructor Details

#initializeTiffIndexedColorFormat

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_algorithmObject

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_percentObject

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_algorithmObject

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.

Returns:

  • (String)

    JSON string representing the TiffIndexedColorFormat object.



28
29
30
31
32
33
34
35
# File 'lib/ruby_client/Imaging/TiffIndexedColorFormat.rb', line 28

def to_json(_options = {})
  json_array = {}
  json_array['quantizationAlgorithm'] = @quantization_algorithm
  json_array['ditheringPercent'] = @dithering_percent
  json_array['ditheringAlgorithm'] = @dithering_algorithm

  JSON.pretty_generate(json_array)
end