Class: DynamicPDFApi::JpegImageFormat
- Inherits:
-
ImageFormat
- Object
- ImageFormat
- DynamicPDFApi::JpegImageFormat
- Defined in:
- lib/ruby_client/Imaging/JpegImageFormat.rb
Overview
Represents JPEG image format with quality.
Instance Attribute Summary collapse
-
#quality ⇒ Object
Gets or sets the quality of the JPEG image.
Attributes inherited from ImageFormat
Instance Method Summary collapse
-
#initialize ⇒ JpegImageFormat
constructor
Initializes a new instance of the JpegImageFormat class.
-
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the JpegImageFormat object.
Constructor Details
#initialize ⇒ JpegImageFormat
Initializes a new instance of the JpegImageFormat class.
14 15 16 17 |
# File 'lib/ruby_client/Imaging/JpegImageFormat.rb', line 14 def initialize super(ImageFormatType::JPEG) @quality = nil end |
Instance Attribute Details
#quality ⇒ Object
Gets or sets the quality of the JPEG image.
9 10 11 |
# File 'lib/ruby_client/Imaging/JpegImageFormat.rb', line 9 def quality @quality end |
Instance Method Details
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the JpegImageFormat object.
24 25 26 27 28 29 |
# File 'lib/ruby_client/Imaging/JpegImageFormat.rb', line 24 def to_json( = {}) json_array = {} json_array['type'] = 'jpeg' json_array['quality'] = @quality JSON.pretty_generate(json_array) end |