lib/image_processing/mini_magick.rb
def resize_and_pad(width, height, background: :transparent, gravity: "Center", **options)
        thumbnail("#{width}x#{height}", **options)
        magick.background color(background)
        magick.gravity gravity
        magick.extent "#{width}x#{height}"
      end
# Resizes the image to fit within the specified dimensions and fills
# the remaining area with the specified background color.
Resizes the image to fit within the specified dimensions and fills
the remaining area with the specified background color.
Resizes the image to fit within the specified dimensions and fills the remaining area with the specified background color .
def resize_and_pad(width, height, background: :transparent, gravity: "Center", **options)
        thumbnail("#{width}x#{height}", **options)
        magick.background color(background)
        magick.gravity gravity
        magick.extent "#{width}x#{height}"
      end
def resize_and_pad ( width , height , background : :transparent , gravity : "Center" , ** options ) thumbnail ( "#{width}x#{height}" , ** options ) magick . background color ( background ) magick . gravity gravity magick . extent "#{width}x#{height}" end
Resizes the image to fit within the specified dimensions and fills
the remaining area with the specified background color.
Resizes the image to fit within the specified dimensions and fills the remaining area with the specified background color .
width
height
background
gravity
options