The Imagick::blackThresholdImage() function is an inbuilt function in PHP which forces all pixels below the threshold value into black while leaving all pixels above the threshold unchanged.
bool Imagick::blackThresholdImage( $threshold )
Parameters: This function accepts a single parameter $threshold which is mandatory. All the pixel value below threshold value which everything turns black.
Return Value: This function returns True on success.
Below program illustrates the Imagick::blackThresholdImage() function in PHP:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.