FIX: properly center letter avatars + bump version
This commit is contained in:
parent
cbce585c91
commit
266f3d677d
1 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
class LetterAvatar
|
class LetterAvatar
|
||||||
|
|
||||||
# BUMP UP if avatar algorithm changes
|
# BUMP UP if avatar algorithm changes
|
||||||
VERSION = 2
|
VERSION = 3
|
||||||
|
|
||||||
# Largest avatar generated, one day when pixel ratio hit 3
|
# Largest avatar generated, one day when pixel ratio hit 3
|
||||||
# we will need to change this
|
# we will need to change this
|
||||||
|
@ -24,7 +24,7 @@ class LetterAvatar
|
||||||
end
|
end
|
||||||
|
|
||||||
def version
|
def version
|
||||||
"2_#{image_magick_version}"
|
"#{VERSION}_#{image_magick_version}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def cache_path
|
def cache_path
|
||||||
|
@ -68,15 +68,15 @@ class LetterAvatar
|
||||||
stroke = darken(color, 0.8)
|
stroke = darken(color, 0.8)
|
||||||
|
|
||||||
instructions = %W{
|
instructions = %W{
|
||||||
-size 240x240
|
-size #{FULLSIZE}x#{FULLSIZE}
|
||||||
xc:#{to_rgb(color)}
|
xc:#{to_rgb(color)}
|
||||||
-pointsize 200
|
-pointsize 180
|
||||||
-fill white
|
-fill white
|
||||||
-gravity Center
|
-gravity Center
|
||||||
-font 'Helvetica'
|
-font 'Helvetica'
|
||||||
-stroke #{to_rgb(stroke)}
|
-stroke #{to_rgb(stroke)}
|
||||||
-strokewidth 2
|
-strokewidth 2
|
||||||
-annotate -5+25 '#{letter}'
|
-annotate -0+20 '#{letter}'
|
||||||
'#{filename}'
|
'#{filename}'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue