Method: Magick::Image#clone

Defined in:
ext/RMagick/rmimage.c

#cloneObject

Copy an image, along with its frozen and tainted state.

Ruby usage:

- @verbatim Image#clone @endverbatim

Parameters:

  • self

    this object

Returns:

  • a clone of this object

[View source]

2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
# File 'ext/RMagick/rmimage.c', line 2428

VALUE
Image_clone(VALUE self)
{
    volatile VALUE clone;

    clone = Image_dup(self);
    if (OBJ_FROZEN(self))
    {
        OBJ_FREEZE(clone);
    }

    return clone;
}