require 'RMagick'

module Airbrush
  module Processors
    class Rmagick < Processor
      def resize(image, width, height)
        img = Magick::Image.read(image)
        img.change_geometry("#{width}x#{height}") { |cols, rows, image| img.resize!(cols, rows) }
        img.to_blob
      end
    end
  end
end

require 'RMagick'

module Airbrush
  module Processors
    class Rmagick < Processor
      def resize(image, width, height)
        img = Magick::Image.from_blob(image).first
        img.change_geometry("#{width}x#{height}") { |cols, rows, image| img.resize!(cols, rows) }
        img.to_blob
      end
    end
  end
end

Update use of RMagick API to read the image data from a blob since the content comes via arguments and not a local file
Update use of RMagick API to read the image data from a blob since the content comes via arguments and not a local file


git-svn-id: 6d9b9a8f21f96071dc3ac7ff320f08f2a342ec80@33 daa9635f-4444-0410-9b3d-b8c75a019348
