Module: Vips::Process::Convert
- Defined in:
- lib/vips-process/convert.rb
Constant Summary collapse
Instance Method Summary collapse
-
#convert(format, opts = {}) ⇒ Object
Converts an image to a different format.
Instance Method Details
#convert(format, opts = {}) ⇒ Object
Converts an image to a different format
12 13 14 15 16 17 18 |
# File 'lib/vips-process/convert.rb', line 12 def convert(format, opts = {}) format = format.to_s.downcase raise ArgumentError, "Format must be one of: #{ALLOWED_FORMATS.join(',')}" unless ALLOWED_FORMATS.include?(format) @_format = format @_format_opts = opts self end |