DJ Mike's Tutorials: PHP

Imagemagick Functions


^

Imagick::trimImage

Description:
bool Imagick::trimImage ( float $fuzz )

Remove edges that are the background color from the image.
Parameters
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.
Return Values
Returns TRUE on success.
Errors/Exceptions
Throws ImagickException on error.

Example


<?php
$image 
= new Imagick("logo.png");
$image->trimimage(10);
header"Content-Type: image/$image->getImageFormat()"  );
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>