mirror of
https://github.com/discourse/discourse.git
synced 2025-03-22 17:27:55 +08:00
BUGFIX: keep transparent background in avatars
This commit is contained in:
parent
3ac20fb711
commit
2f23ee1830
@ -68,12 +68,13 @@ class OptimizedImage < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.resize(from, to, width, height)
|
||||
# NOTE: ORDER is important!
|
||||
instructions = %W{
|
||||
#{from}
|
||||
-background transparent
|
||||
-gravity center
|
||||
-thumbnail #{width}x#{height}^
|
||||
-extent #{width}x#{height}
|
||||
-background transparent
|
||||
-interpolate bicubic
|
||||
-unsharp 2x0.5+0.7+0
|
||||
-quality 98
|
||||
|
Loading…
x
Reference in New Issue
Block a user