Method: Magick::Image#black_threshold

Defined in:
ext/RMagick/rmimage.cpp

#black_threshold(red) ⇒ Numeric #black_threshold(red, green) ⇒ Numeric #black_threshold(red, green, blue) ⇒ Numeric #black_threshold(red, green, blue, alpha: ) ⇒ Numeric

Forces all pixels below the threshold into black while leaving all pixels above the threshold unchanged.

Overloads:

  • #black_threshold(red) ⇒ Numeric

    Parameters:

    • red (Numeric)

      the number for red channel

  • #black_threshold(red, green) ⇒ Numeric

    Parameters:

    • red (Numeric)

      the number for red channel

    • green (Numeric)

      the number for green channel

  • #black_threshold(red, green, blue) ⇒ Numeric

    Parameters:

    • red (Numeric)

      the number for red channel

    • green (Numeric)

      the number for green channel

    • blue (Numeric)

      the number for blue channel

  • #black_threshold(red, green, blue, alpha: ) ⇒ Numeric

    Parameters:

    • red (Numeric)

      the number for red channel

    • green (Numeric)

      the number for green channel

    • blue (Numeric)

      the number for blue channel

    • alpha (Numeric) (defaults to: )

      the number for alpha channel

Returns:

  • (Numeric)

    a new image

See Also:



1585
1586
1587
1588
1589
# File 'ext/RMagick/rmimage.cpp', line 1585

VALUE
Image_black_threshold(int argc, VALUE *argv, VALUE self)
{
    return threshold_image(argc, argv, self, GVL_FUNC(BlackThresholdImage));
}