BUGFIX: uploaded avatar aren't cropped

This commit is contained in:
Régis Hanol 2014-06-04 18:54:08 +02:00
parent bc7730e0dd
commit 16b1379b01
1 changed files with 3 additions and 1 deletions

View File

@ -70,7 +70,9 @@ class OptimizedImage < ActiveRecord::Base
def self.resize(from, to, width, height) def self.resize(from, to, width, height)
instructions = %W{ instructions = %W{
#{from} #{from}
-resize #{width}x#{height} -gravity center
-thumbnail #{width}x#{height}^
-extent #{width}x#{height}
-background transparent -background transparent
-interpolate bicubic -interpolate bicubic
-unsharp 2x0.5+0.7+0 -unsharp 2x0.5+0.7+0