Method: Magick::Image#cycle_colormap

Defined in:
ext/RMagick/rmimage.c

#cycle_colormap(amount) ⇒ Object

Call CycleColormapImage.

Ruby usage:

- @verbatim Image#cycle_colormap @endverbatim

Parameters:

  • self

    this object

  • amount

    amount to cycle the colormap

Returns:

  • a new image


4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
# File 'ext/RMagick/rmimage.c', line 4296

VALUE
Image_cycle_colormap(VALUE self, VALUE amount)
{
    Image *image, *new_image;
    int amt;

    image = rm_check_destroyed(self);

    new_image = rm_clone_image(image);
    amt = NUM2INT(amount);
    (void) CycleColormapImage(new_image, amt);
    // No need to check for an error

    return rm_image_new(new_image);
}