Class: DragonflyMozjpeg::Processors::Lossless

Inherits:
Object
  • Object
show all
Defined in:
lib/dragonfly_mozjpeg/processors/lossless.rb

Instance Method Summary collapse

Instance Method Details

#call(content, opts = nil) ⇒ Object



6
7
8
9
10
# File 'lib/dragonfly_mozjpeg/processors/lossless.rb', line 6

def call(content, opts = nil)
  content.shell_update ext: 'jpg' do |input, output|
    "#{content.env[:jpegtran]} #{Utils.stringify_options(opts)} -outfile #{output} #{input}"
  end
end

#update_url(url_attributes, format, options = {}) ⇒ Object



12
13
14
# File 'lib/dragonfly_mozjpeg/processors/lossless.rb', line 12

def update_url(url_attributes, format, options = {})
  url_attributes.ext = format.to_s
end