Sha256: b86524c646cff0fb53b1657e78a3f2f5e0abd0255ce0b0bea0f2b815bf06b264
Contents?: true
Size: 483 Bytes
Versions: 8
Compression:
Stored size: 483 Bytes
Contents
# lib/paperclip_processors/cropper.rb module Paperclip class Cropper < Thumbnail def transformation_command if crop_command crop_command + super.join(" ").sub(/ -crop \S+/, '').split(" ") else super end end def crop_command target = @attachment.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 end end
Version data entries
8 entries across 8 versions & 1 rubygems