# File lib/dragonfly/processing/r_magick_processor.rb, line 74 def resize_and_crop(temp_object, opts={}) rmagick_image(temp_object) do |image| width = opts[:width] ? opts[:width].to_i : image.columns height = opts[:height] ? opts[:height].to_i : image.rows gravity = GRAVITIES[opts[:gravity]] || Magick::CenterGravity image.crop_resized(width, height, gravity) end end