Method: Magick::Image#linear_stretch
- Defined in:
- ext/RMagick/rmimage.c
permalink #linear_stretch(*args) ⇒ Object
Call LinearStretchImage.
Ruby usage:
- @verbatim Image_linear_stretch(black_point) @endverbatim
- @verbatim Image_linear_stretch(black_point , white_point) @endverbatim
Notes:
- Default white_point is pixels-black_point
7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 |
# File 'ext/RMagick/rmimage.c', line 7874
VALUE
Image_linear_stretch(int argc, VALUE *argv, VALUE self)
{
Image *image, *new_image;
double black_point, white_point;
image = rm_check_destroyed(self);
get_black_white_point(image, argc, argv, &black_point, &white_point);
new_image = rm_clone_image(image);
(void) LinearStretchImage(new_image, black_point, white_point);
rm_check_image_exception(new_image, DestroyOnError);
return rm_image_new(new_image);
}
|