图片压缩分情况处理
This commit is contained in:
parent
4337a9d1fd
commit
dfaab07455
4
Gemfile
4
Gemfile
|
@ -4,9 +4,9 @@ unless RUBY_PLATFORM =~ /w32/
|
|||
# unix-like only
|
||||
gem 'iconv'
|
||||
if RUBY_PLATFORM =~ /darwin/
|
||||
# gem "rmagick", "= 2.15.4" ## osx must be this version
|
||||
gem "rmagick", "= 2.15.4" ## osx must be this version
|
||||
elsif RUBY_PLATFORM =~ /linux/
|
||||
# gem "rmagick", "~> 2.13.1" ## centos yum install ImageMagick-devel
|
||||
gem "rmagick", "~> 2.13.1" ## centos yum install ImageMagick-devel
|
||||
end
|
||||
gem 'certified'
|
||||
gem 'net-ssh', '2.9.1'
|
||||
|
|
|
@ -65,7 +65,11 @@ class AvatarController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
Trustie::Utils::Image.new(diskfile,true).compress(300)
|
||||
if @source_type == 'Contest'
|
||||
Trustie::Utils::Image.new(diskfile,true).compress(600)
|
||||
else
|
||||
Trustie::Utils::Image.new(diskfile,true).compress(300)
|
||||
end
|
||||
@status = 0
|
||||
@msg = ''
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue