DJ Mike's Tutorials: PHP

Imagemagick Functions


^

Imagick::roundCorners

Description:
bool Imagick::roundCorners ( float $x_rounding , float $y_rounding [, float $stroke_width [, float $displace [, float $size_correction ]]] )

Rounds image corners. Three last parameters are optional and rarely needed.
Parameters
x_rounding
Rounding on x axis
y_rounding
Rounding on y axis
stroke_width
stroke width
displace
image displace
size_correction
Size correction
Return Values
Returns TRUE on success.

Example


<?
$url 
"http://eclecticdjs.com/mike/tutorials/php/imagemagick/examples_07/opossum.jpg";

# read image as a blob instead of from a file path
$blob file_get_contents("$url");
$image = new imagick();
$image->readImageBlob("$blob");

# round the corners
$image->roundcorners2020 );

# get the original image fomat
$format $image->getformat(); 

# write headers for original format 
header("content-type:image/$format");
echo 
"$image";
?>



^

Created by DJ Mike from Santa Barbara

DJ Mike


Dance Away Santa Barbara's Home Page
<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>