lib/carrierwave/processing/rmagick.rb
##
# Resize the image per the provided geometry string.
#
# === Parameters
#
# [geometry_string (String)] the proportions in which to scale image
#
# === Yields
#
# [Magick::Image] additional manipulations to perform
#
Resize the image per the provided geometry string.
Parameters

[geometry_string (String)] the proportions in which to scale image

Yields

[Magick::Image] additional manipulations to perform
Resize the image per the provided geometry string . Parameters [ geometry_string ( String ) ] the proportions in which to scale image Yields [ Magick :: Image ] additional manipulations to perform
def resize_to_geometry_string(geometry_string)
      manipulate! do |img|
        new_img = img.change_geometry(geometry_string) do |new_width, new_height|
          img.resize(new_width, new_height)
        end
        destroy_image(img)
        new_img = yield(new_img) if block_given?
        new_img
      end
    end
def resize_to_geometry_string ( geometry_string ) manipulate! do | img | new_img = img . change_geometry ( geometry_string ) do | new_width , new_height | img . resize ( new_width , new_height ) end destroy_image ( img ) new_img = yield ( new_img ) if block_given? new_img end end
Resize the image per the provided geometry string.
Resize the image per the provided geometry string .
geometry_string