Sha256: 2adf5d3638b15b3d522f4b714b73a898a5ceaee707af5d4cfee663f2a9ccab52

Contents?: true

Size: 413 Bytes

Versions: 3

Compression:

Stored size: 413 Bytes

Contents

# This is a hook into Dragonfly's ImageMagick processor class
# It makes sure quality is 100 for thumbnail generation

require 'dragonfly'

module Dragonfly
  module Processing
    class ImageMagickProcessor
      
      def convert(temp_object, args='', format=nil)
        args = "#{args} -quality 100" unless args.blank?
        format ? [super, {:format => format.to_sym}] : super
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
moxify-0.1.7.3 lib/moxify/dragonfly_quality_hook.rb
moxify-0.1.7.2 lib/moxify/dragonfly_quality_hook.rb
moxify-0.1.7.1 lib/moxify/dragonfly_quality_hook.rb