提升头像图片显示分辨力

This commit is contained in:
yanxd 2013-10-12 10:36:50 +08:00
parent 6676110b11
commit f1a31c7f6b
1 changed files with 6 additions and 4 deletions

View File

@ -55,9 +55,11 @@ class AvatarController < ApplicationController
# saved = @avatar.save # saved = @avatar.save
begin begin
f = Magick::ImageList.new(diskfile) f = Magick::ImageList.new(diskfile)
f.scale!(50,50) f.scale!(100,100)
#f.scale!(50,50)
f.write(diskfile) f.write(diskfile)
rescue rescue Exception => e
logger.error "[avatar] Error : avatar_cntroller#upload ===> #{e}"
end end