Class: Imagecache::Conversions::Resize
- Inherits:
-
Object
- Object
- Imagecache::Conversions::Resize
- Defined in:
- lib/imagecache/conversions/resize.rb
Instance Method Summary collapse
Instance Method Details
#process(file, metadata, conversion) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/imagecache/conversions/resize.rb', line 7 def process(file, , conversion) width = conversion.width height = conversion.height command = "convert #{file.path} -resize #{width}x#{height} #{file.path}" Rails.logger.debug(command) output = `#{command}` data = File.open(file.path).read File.unlink(file.path) data end |