From 691068dad7a799c6821dc73e6f47d748a25c897a Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Wed, 12 Jan 2022 22:16:09 +0100 Subject: [PATCH] Remove old paperclip processor --- lib/paperclip_processors/cropper.rb | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 lib/paperclip_processors/cropper.rb diff --git a/lib/paperclip_processors/cropper.rb b/lib/paperclip_processors/cropper.rb deleted file mode 100644 index ddbb076c..00000000 --- a/lib/paperclip_processors/cropper.rb +++ /dev/null @@ -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