Method: Magick::Image#sample!

Defined in:
ext/RMagick/rmimage.cpp

#sample!(scale) ⇒ Magick::Image #sample!(cols, rows) ⇒ Magick::Image

Scale an image to the desired dimensions with pixel sampling. In-place form of #sample.

Overloads:

  • #sample!(scale) ⇒ Magick::Image

    Parameters:

    • scale (Numeric)

      You can use this argument instead of specifying the desired width and height. The percentage size change. For example, 1.25 makes the new image 125% of the size of the receiver. The scale factor 0.5 makes the new image 50% of the size of the receiver.

  • #sample!(cols, rows) ⇒ Magick::Image

    Parameters:

    • cols (Numeric)

      The desired width.

    • rows (Numeric)

      The desired height.

Returns:

See Also:



12431
12432
12433
12434
12435
12436
# File 'ext/RMagick/rmimage.cpp', line 12431

VALUE
Image_sample_bang(int argc, VALUE *argv, VALUE self)
{
    rm_check_frozen(self);
    return scale(True, argc, argv, self, GVL_FUNC(SampleImage));
}