提升头像图片显示分辨力
This commit is contained in:
parent
6676110b11
commit
f1a31c7f6b
|
@ -54,10 +54,12 @@ class AvatarController < ApplicationController
|
||||||
# @avatar.image_file = params[:filename].presence || Redmine::Utils.random_hex(16)
|
# @avatar.image_file = params[:filename].presence || Redmine::Utils.random_hex(16)
|
||||||
# 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.write(diskfile)
|
#f.scale!(50,50)
|
||||||
rescue
|
f.write(diskfile)
|
||||||
|
rescue Exception => e
|
||||||
|
logger.error "[avatar] Error : avatar_cntroller#upload ===> #{e}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue