The Imagick class
PHP Manual

Imagick::trimImage

(No version information available, might be only in CVS)

Imagick::trimImageRemove edges from the image

Opis

bool Imagick::trimImage ( float $fuzz )
Ostrzeżenie

Ta funkcja jest obecnie nieudokumentowana, dostępna jest jedynie lista jej argumentów.

Remove edges that are the background color from the image.

Parametry

fuzz

By default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same.

Zwracane wartości

Zwraca TRUE w przypadku sukcesu.

Błędy/Wyjątki

Zgłasza wyjątek ImagickException w przypadku błędu.

Przykłady

Example #1 Using Imagick::trimImage():

Trim an image, then display to the browser.

<?php
/* Create the object and read the image in */
$im = new Imagick"image.jpg" );

/* Trim the image. */
$im->trimImage);

/* Ouput the image */
header"Content-Type: image/" $im->getImageFormat() );
echo 
$im;
?>


The Imagick class
PHP Manual