array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'imagick.whitethresholdimage.php', 1 => 'Imagick::whiteThresholdImage', 2 => 'Force all pixels above the threshold into white', ), 'up' => array ( 0 => 'class.imagick.php', 1 => 'Imagick', ), 'prev' => array ( 0 => 'imagick.waveimage.php', 1 => 'Imagick::waveImage', ), 'next' => array ( 0 => 'imagick.writeimage.php', 1 => 'Imagick::writeImage', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagick/whitethresholdimage.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PECL imagick 2, PECL imagick 3)
Imagick::whiteThresholdImage — Force all pixels above the threshold into white
Is like Imagick::ThresholdImage() but force all pixels above the threshold into white while leaving all pixels below the threshold unchanged.
threshold
Liefert true bei Erfolg.
| Version | Beschreibung |
|---|---|
| PECL imagick 2.1.0 | Now allows a string representing the color as a parameter. Previous versions allow only an ImagickPixel object. |
Beispiel #1 Imagick::whiteThresholdImage()
<?php
function whiteThresholdImage($imagePath, $color) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->whiteThresholdImage($color);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>