Sha256: 6d2a812d9045d2e9ac8eecc36a722cae13f5f72f5b37d9219f4dbfe35634ce84
Contents?: true
Size: 918 Bytes
Versions: 2
Compression:
Stored size: 918 Bytes
Contents
module Dragonfly module ImageMagick module Processors class Convert def call(content, args='', opts={}) convert_command = content.env[:convert_command] || 'convert' format = opts['format'] input_args = opts['input_args'] if opts['input_args'] delegate_string = "#{opts['delegate']}:" if opts['delegate'] frame_string = "[#{opts['frame']}]" if opts['frame'] content.shell_update :ext => format do |old_path, new_path| "#{convert_command} #{input_args} #{delegate_string}#{old_path}#{frame_string} #{args} #{new_path}" end if format content.meta['format'] = format.to_s content.ext = format end end def update_url(attrs, args='', opts={}) format = opts['format'] attrs.ext = format if format end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dragonfly-1.1.2 | lib/dragonfly/image_magick/processors/convert.rb |
dragonfly-1.1.1 | lib/dragonfly/image_magick/processors/convert.rb |