lib/carrierwave/processing/rmagick.rb
##
# From the RMagick documentation: "Resize the image to fit within the
# specified dimensions while retaining the aspect ratio of the original
# image. If necessary, crop the image in the larger dimension."
#
# See even http://www.imagemagick.org/RMagick/doc/image3.html#resize_to_fill
#
# === Parameters
#
# [width (Integer)] the width to scale the image to
# [height (Integer)] the height to scale the image to
#
# === Yields
#
# [Magick::Image] additional manipulations to perform
#
From the RMagick documentation: "Resize the image to fit within the
specified dimensions while retaining the aspect ratio of the original
image. If necessary, crop the image in the larger dimension."



Parameters

[width (Integer)] the width to scale the image to
[height (Integer)] the height to scale the image to

Yields

[Magick::Image] additional manipulations to perform
From the RMagick documentation : " Resize the image to fit within the specified dimensions while retaining the aspect ratio of the original image . If necessary crop the image in the larger dimension . " Parameters [ width ( Integer ) ] the width to scale the image to [ height ( Integer ) ] the height to scale the image to Yields [ Magick :: Image ] additional manipulations to perform
def resize_to_fill(width, height, gravity=::Magick::CenterGravity)
      width = dimension_from width
      height = dimension_from height
      manipulate! do |img|
        img.crop_resized!(width, height, gravity)
        img = yield(img) if block_given?
        img
      end
    end
def resize_to_fill ( width , height , gravity = :: Magick :: CenterGravity ) width = dimension_from width height = dimension_from height manipulate! do | img | img . crop_resized! ( width , height , gravity ) img = yield ( img ) if block_given? img end end
From the RMagick documentation: "Resize the image to fit within the
specified dimensions while retaining the aspect ratio of the original
image.
From the RMagick documentation : " Resize the image to fit within the specified dimensions while retaining the aspect ratio of the original image .
width
height
gravity