Method: Magick::Image#crop!

Defined in:
ext/RMagick/rmimage.cpp

#crop!(x, y, width, height, reset = false) ⇒ Magick::Image #crop!(gravity, width, height, reset = false) ⇒ Magick::Image #crop!(gravity, x, y, width, height, reset = false) ⇒ Magick::Image

Extract a region of the image defined by width, height, x, y. In-place form of #crop.

Overloads:

  • #crop!(x, y, width, height, reset = false) ⇒ Magick::Image

    Parameters:

    • x (Numeric)

      x position of start of region

    • y (Numeric)

      y position of start of region

    • width (Numeric)

      width of region

    • height (Numeric)

      height of region

    • reset (Boolean) (defaults to: false)

      true if reset the cropped image page canvas and position

  • #crop!(gravity, width, height, reset = false) ⇒ Magick::Image

    Parameters:

    • gravity (Magick::GravityType)

      the gravity type

    • width (Numeric)

      width of region

    • height (Numeric)

      height of region

    • reset (Boolean) (defaults to: false)

      true if reset the cropped image page canvas and position

  • #crop!(gravity, x, y, width, height, reset = false) ⇒ Magick::Image

    Parameters:

    • gravity (Magick::GravityType)

      the gravity type

    • x (Numeric)

      x position of start of region

    • y (Numeric)

      y position of start of region

    • width (Numeric)

      width of region

    • height (Numeric)

      height of region

    • reset (Boolean) (defaults to: false)

      true if reset the cropped image page canvas and position

Returns:

See Also:



5071
5072
5073
5074
5075
5076
# File 'ext/RMagick/rmimage.cpp', line 5071

VALUE
Image_crop_bang(int argc, VALUE *argv, VALUE self)
{
    rm_check_frozen(self);
    return cropper(True, argc, argv, self);
}