This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Paperclip | |
class Rotator < Thumbnail | |
def transformation_command | |
if rotate_command | |
# having the "super" at the end ensures that your thumbnails are allways "inside the limits of your styles" | |
# for some reason, super returns: ["-resize", "\"300x300>\""]:Array | |
"#{rotate_command} #{super.join(' ')}" | |
else | |
super | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://pastie.org/995357 | |
module Paperclip | |
class Cropper < Thumbnail | |
def transformation_command | |
if crop_command | |
puts "CROP: #{crop_command + super.join(' ').sub(/ -crop \S+/, '').split(' ')}" | |
crop_command + super.join(' ').sub(/ -crop \S+/, '').split(' ') | |
else | |
super |
NewerOlder