DJ Mike's Tutorials: PHP

ImageMagick Functions

^

Imagick::blackThresholdImage

Description:
blackThresholdImage ( mixed $threshold )

Is like Imagick::ThresholdImage() but force all pixels below the threshold into black while leaving all pixels below the threshold unchanged.

Note: blackThresholdImage does not work the way that the manual says it does. If you enter a non-gray color, you get a colored high contrast image.
Parameters:
threshold
A string or ImagickPixel object representing the threshold color.
Return Values
Returns TRUE on success.

Examples



<?php
header
("Content-type: image/jpeg");
$image = new Imagick("opossum.jpg"); 
$image->blackthresholdImage"#999999" );
echo 
$image;
?> 


<?php
header
("Content-type: image/jpeg");
$image = new Imagick("opossum.jpg"); 
$image->blackthresholdImage"#3399dd" );
echo 
$image;
?> 


^


Created by DJ Mike from Santa Barbara

DJ Mike


Dance Away Santa Barbara's Home Page
<a href="http://www.statcounter.com/" target="_blank"> <img src="http://c5.statcounter.com/counter.php?sc_project=1321035&java=0&security=da2193dc" alt="counter free hit invisible" border="0" /></a>