mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:29:53 +01:00
Remove old paperclip processor
This commit is contained in:
parent
60a8e3ac7d
commit
691068dad7
1 changed files with 0 additions and 26 deletions
|
@ -1,26 +0,0 @@
|
|||
module Paperclip
|
||||
class Cropper < Thumbnail
|
||||
def transformation_command
|
||||
if crop_command
|
||||
x = super
|
||||
i = x.index '-crop'
|
||||
2.times { x.delete_at i } if i
|
||||
crop_command + x
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
def crop_command
|
||||
target = @attachment.instance
|
||||
if target.cropping?
|
||||
case @attachment.name
|
||||
when :profile_picture
|
||||
['-auto-orient', '-strip', '+repage', '-crop', "'#{target.crop_w.to_i}x#{target.crop_h.to_i}+#{target.crop_x.to_i}+#{target.crop_y.to_i}'"]
|
||||
when :profile_header
|
||||
['-auto-orient', '-strip', '+repage', '-crop', "'#{target.crop_h_w.to_i}x#{target.crop_h_h.to_i}+#{target.crop_h_x.to_i}+#{target.crop_h_y.to_i}'"]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue