Method: Magick::Image#normalize

Defined in:
ext/RMagick/rmimage.c

#normalizeObject

Enhance the contrast of a color image by adjusting the pixels color to span the entire range of colors available.

Ruby usage:

- @verbatim Image#normalize @endverbatim

Parameters:

  • self

    this object

Returns:

  • a new image

[View source]

9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
# File 'ext/RMagick/rmimage.c', line 9177

VALUE
Image_normalize(VALUE self)
{
    Image *image, *new_image;

    image = rm_check_destroyed(self);
    new_image = rm_clone_image(image);

    (void) NormalizeImage(new_image);
    rm_check_image_exception(new_image, DestroyOnError);

    return rm_image_new(new_image);
}