Class: Paperclip::Cropper
- Inherits:
-
Thumbnail
- Object
- Thumbnail
- Paperclip::Cropper
- Defined in:
- lib/paperclip_processors/cropper.rb
Instance Method Summary collapse
Instance Method Details
#crop_command ⇒ Object
12 13 14 15 16 17 |
# File 'lib/paperclip_processors/cropper.rb', line 12 def crop_command target = .instance if target.cropping? [" -crop '#{target.crop_w.to_i}x#{target.crop_h.to_i}+#{target.crop_x.to_i}+#{target.crop_y.to_i}'"] end end |
#transformation_command ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/paperclip_processors/cropper.rb', line 4 def transformation_command if crop_command crop_command + super.join(" ").sub(/ -crop \S+/, '').split(" ") else super end end |