Class: Paperclip::AutoOrient
- Inherits:
-
Processor
- Object
- Processor
- Paperclip::AutoOrient
- Defined in:
- lib/paperclip/auto_orient.rb
Instance Method Summary collapse
-
#initialize(file, options = {}, *args) ⇒ AutoOrient
constructor
A new instance of AutoOrient.
- #make(*args) ⇒ Object
Constructor Details
#initialize(file, options = {}, *args) ⇒ AutoOrient
Returns a new instance of AutoOrient.
5 6 7 |
# File 'lib/paperclip/auto_orient.rb', line 5 def initialize(file, = {}, *args) @file = file end |
Instance Method Details
#make(*args) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/paperclip/auto_orient.rb', line 9 def make( *args ) dst = Tempfile.new([@basename, @format].compact.join(".")) dst.binmode Paperclip.run('convert',"'#{File.(@file.path)}' -auto-orient #{File.(dst.path)}") return dst end |