<?
$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->roundcorners( 20, 20 );
# get the original image fomat
$format = $image->getformat();
# write headers for original format
header("content-type:image/$format");
echo "$image";
?>
|
|
|