Class: DynamicPDFApi::BmpImageFormat

Inherits:
ImageFormat show all
Defined in:
lib/ruby_client/Imaging/BmpImageFormat.rb

Overview

Represents BMP image format with color format.

Instance Attribute Summary collapse

Attributes inherited from ImageFormat

#type

Instance Method Summary collapse

Constructor Details

#initializeBmpImageFormat

Initializes a new instance of the BmpImageFormat class.



14
15
16
17
# File 'lib/ruby_client/Imaging/BmpImageFormat.rb', line 14

def initialize
  super(ImageFormatType::BMP)
  @color_format = nil
end

Instance Attribute Details

#color_formatObject

Gets or sets the BmpColorFormat for BMP.



9
10
11
# File 'lib/ruby_client/Imaging/BmpImageFormat.rb', line 9

def color_format
  @color_format
end

Instance Method Details

#to_json(_options = {}) ⇒ String

Returns a JSON representation of the BmpImageFormat object.

Returns:

  • (String)

    JSON string representing the BmpImageFormat object.



24
25
26
27
28
29
30
# File 'lib/ruby_client/Imaging/BmpImageFormat.rb', line 24

def to_json(_options = {})
  json_array = {}
  json_array['type'] = 'bmp'

  json_array['colorFormat'] = @color_format
  JSON.pretty_generate(json_array)
end