Method: Magick::Image#dup
- Defined in:
- ext/RMagick/rmimage.c
permalink #dup ⇒ Object
Construct a new image object and call initialize_copy.
Ruby usage:
- @verbatim Image#dup @endverbatim
5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 |
# File 'ext/RMagick/rmimage.c', line 5272
VALUE
Image_dup(VALUE self)
{
volatile VALUE dup;
(void) rm_check_destroyed(self);
dup = Data_Wrap_Struct(CLASS_OF(self), NULL, rm_image_destroy, NULL);
if (rb_obj_tainted(self))
{
(void) rb_obj_taint(dup);
}
return rb_funcall(dup, rm_ID_initialize_copy, 1, self);
}
|