Sha256: a2c68db43671be929ac9e41e3d3694e574e7e7b7870ae423d460c2a6404fdc99
Contents?: true
Size: 503 Bytes
Versions: 93
Compression:
Stored size: 503 Bytes
Contents
module Paperclip class Cropper < Thumbnail def transformation_command if @attachment.instance.cropping? 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}", '+repage' ] end end end end
Version data entries
93 entries across 93 versions & 1 rubygems