Sha256: 962bb683c6e9d358e2e4883251bb0dd3283e3f7ab0a507c2e0f6de4bbd0ce249
Contents?: true
Size: 829 Bytes
Versions: 4
Compression:
Stored size: 829 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'] frame_string = "[#{opts['frame']}]" if opts['frame'] content.shell_update :ext => format do |old_path, new_path| "#{convert_command} #{input_args} #{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
4 entries across 4 versions & 1 rubygems