Class: VIPS::JPEGWriter
- Defined in:
- lib/vips/writer.rb,
ext/writer.c more...
Instance Attribute Summary collapse
-
#quality ⇒ Object
Returns the value of attribute quality.
Instance Method Summary collapse
-
#initialize(image, options = {}) ⇒ JPEGWriter
constructor
A new instance of JPEGWriter.
- #to_memory ⇒ Object
- #write(path) ⇒ Object
Methods inherited from Writer
#exif=, #icc=, #image, #remove_exif, #remove_icc
Methods included from Header
#band_fmt, #bands, #exif, #exif?, #get, #icc, #icc?, #n_elements, #set, #sizeof_element, #sizeof_line, #sizeof_pel, #x_offset, #x_res, #x_size, #y_offset, #y_res, #y_size
Constructor Details
permalink #initialize(image, options = {}) ⇒ JPEGWriter
Returns a new instance of JPEGWriter.
26 27 28 29 30 31 32 |
# File 'lib/vips/writer.rb', line 26 def initialize(image, ={}) super image @quality = 75 self.quality = [:quality] if .has_key?(:quality) end |
Instance Attribute Details
permalink #quality ⇒ Object
Returns the value of attribute quality.
24 25 26 |
# File 'lib/vips/writer.rb', line 24 def quality @quality end |
Instance Method Details
permalink #to_memory ⇒ Object
[View source]
38 39 40 |
# File 'lib/vips/writer.rb', line 38 def to_memory buf_internal @quality end |
permalink #write(path) ⇒ Object
[View source]
34 35 36 |
# File 'lib/vips/writer.rb', line 34 def write(path) write_internal "#{path}:#{@quality}" end |