mirror of
https://github.com/discourse/discourse.git
synced 2025-03-25 05:16:53 +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
|
end
|
||||||
|
|
||||||
def self.resize(from, to, width, height)
|
def self.resize(from, to, width, height)
|
||||||
|
# NOTE: ORDER is important!
|
||||||
instructions = %W{
|
instructions = %W{
|
||||||
#{from}
|
#{from}
|
||||||
|
-background transparent
|
||||||
-gravity center
|
-gravity center
|
||||||
-thumbnail #{width}x#{height}^
|
-thumbnail #{width}x#{height}^
|
||||||
-extent #{width}x#{height}
|
-extent #{width}x#{height}
|
||||||
-background transparent
|
|
||||||
-interpolate bicubic
|
-interpolate bicubic
|
||||||
-unsharp 2x0.5+0.7+0
|
-unsharp 2x0.5+0.7+0
|
||||||
-quality 98
|
-quality 98
|
||||||
|
Loading…
x
Reference in New Issue
Block a user