Method: Magick::Image#trim!

Defined in:
ext/RMagick/rmimage.cpp

#trim!(reset = false) ⇒ Magick::Image

Removes the edges that are exactly the same color as the corner pixels. Use the fuzz attribute to make trim remove edges that are nearly the same color as the corner pixels.

Returns self.

Parameters:

  • reset (Boolean) (defaults to: false)

    The trim method retains the offset information in the cropped image. This may cause the image to appear to be surrounded by blank or black space when viewed with an external viewer. This only occurs when the image is saved in a format (such as GIF) that saves offset information. To reset the offset data, use true as the argument to trim.

Returns:

See Also:



15003
15004
15005
15006
15007
15008
# File 'ext/RMagick/rmimage.cpp', line 15003

VALUE
Image_trim_bang(int argc, VALUE *argv, VALUE self)
{
    rm_check_frozen(self);
    return trimmer(True, argc, argv, self);
}