error_reporting(0);
include("functions.php");
$h1 = "DJ Mike's Image Maker 2";
$h2 = "Round Corners";
##### Start blur
if ( $_GET[x_rounding] && $_GET[y_rounding] )
{
$x_rounding = (float)trim( $_GET[x_rounding] );
$y_rounding = (float)trim( $_GET[y_rounding] );
#############
$image = new Imagick($_SESSION[path]);
foreach ($image as $frame)
{ $frame->roundcorners($x_rounding, $y_rounding ); }
$format = strtolower( $image->getimageformat() );
$path = "temp/$ID.$_SESSION[views].$format";
$frames = $image->getNumberImages();
if ( $frames > 1) { $image->writeImages("$path", TRUE); }
else { $image->writeImage("$path"); }
# save settings
$_SESSION[path] = $path;
$_SESSION[x_rounding] = $x_rounding;
$_SESSION[y_rounding] = $y_rounding;
header("Location: display.php");
exit;
}
######### end round corners
include("top.php");
?>