lib/carrierwave/processing/mini_magick.rb
##
# 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
# [gravity (String)] the current gravity suggestion (default: 'Center'; options: 'NorthWest', 'North', 'NorthEast', 'West', 'Center', 'East', 'SouthWest', 'South', 'SouthEast')
# [combine_options (Hash)] additional ImageMagick options to apply before resizing
#
# === Yields
#
# [MiniMagick::Image] additional manipulations to perform
#
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



Yields

[MiniMagick::Image] additional manipulations to perform
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 Yields [ MiniMagick :: Image ] additional manipulations to perform
def resize_to_fill(width, height, gravity = 'Center', combine_options: {}, &block)
      width, height = resolve_dimensions(width, height)
      minimagick!(block) do |builder|
        builder.resize_to_fill(width, height, gravity: gravity)
          .apply(combine_options)
      end
    end
def resize_to_fill ( width , height , gravity = 'Center' , combine_options : { } , & block ) width , height = resolve_dimensions ( width , height ) minimagick! ( block ) do | builder | builder . resize_to_fill ( width , height , gravity : gravity ) . apply ( combine_options ) end end
Resize the image to fit within the specified dimensions while retaining
the aspect ratio of the original image.
Resize the image to fit within the specified dimensions while retaining the aspect ratio of the original image .
width
height
gravity
combine_options
block