downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Imagick::blurImage> <Imagick::averageImages
[edit] Last updated: Fri, 07 Jun 2013

view this page in

Imagick::blackThresholdImage

(PECL imagick 2.0.0)

Imagick::blackThresholdImageFuerza a todos los píxeles bajo un umbral a ser negros

Descripción

bool Imagick::blackThresholdImage ( mixed $threshold )

Es como Imagick::thresholdImage() pero fuerza a todos los píxeles bajo un umbral a ser negros mientras deja todos los píxeles por encima del umbral sin cambios.

Parámetros

threshold

El umbral por debajo del cual todo se vuelve de color negro

Valores devueltos

Devuelve TRUE en caso de éxito.

Historial de cambios

Versión Descripción
2.1.0 Ahora se permite que una cadena represente el color como un parámetro. Versiones anteriores sólo permitían un objeto ImagickPixel.



add a note add a note User Contributed Notes Imagick::blackThresholdImage - [2 notes]
up
0
Iddles
1 year ago
You need to pass this function a colour:

<?php

$img
->blackThresholdImage( "#FFFFFF" );

?>

E.g. this blackens any pixel which isn't pure white.
up
0
elmer at web-axis dot net
4 years ago
Here's a example of this function:

<?php
  $img
= new Imagick();
 
$img->readImage($image_file_name);
 
$img->blackThresholdImage('grey');
 
$img->writeImage($thumb_file_name);
 
$img->clear();
 
$img->destroy();
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites