Here's a example of this function:
<?php
  $img = new Imagick();
  $img->readImage($image_file_name);
  $img->whiteThresholdImage('grey');
  $img->writeImage($thumb_file_name);
  $img->clear();
  $img->destroy();
?>(PECL imagick 2, PECL imagick 3)
Imagick::whiteThresholdImage — Fuerza a todos los píxeles por encima del umbral a ser blancos
Es como Imagick::ThresholdImage() excepto que fuerza a todos los píxeles por encima del umbral a ser blancos dejando todos los píxeles por debajo del umbral sin cambios.
threshold
   Devuelve true en caso de éxito.
  
| Versión | Descripción | 
|---|---|
| ECL imagick 2.1.0 | Ahora se permite que una cadena represente el color como parámetro. Versiones previas sólo permitían un objeto ImagickPixel. | 
Ejemplo #1 Imagick::whiteThresholdImage()
<?php
function whiteThresholdImage($imagePath, $color) {
    $imagick = new \Imagick(realpath($imagePath));
    $imagick->whiteThresholdImage($color);
    header("Content-Type: image/jpg");
    echo $imagick->getImageBlob();
}
?>Here's a example of this function:
<?php
  $img = new Imagick();
  $img->readImage($image_file_name);
  $img->whiteThresholdImage('grey');
  $img->writeImage($thumb_file_name);
  $img->clear();
  $img->destroy();
?>