DJ Mike's Tutorials: PHP

ImageMagick Functions

^

Imagick::whiteThresholdImage

Description:
bool Imagick::whiteThresholdImage ( mixed $threshold )

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

Note: whiteThresholdImage 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
String or ImagickPixel object representing threshold.
Return Values
Returns TRUE on success.

Examples

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


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


Was this webpage useful to you? You can support this website by donating.


Created by DJ Mike from Santa Barbara

DJ Mike


<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>