Source for file roundedCornersOnTheFly.php
Documentation is available at roundedCornersOnTheFly.php
$image = imagecreatetruecolor($c_width, $c_height);
$col_ellipse = hex2int($image, $color);
// fill the background color
// fill the background color
imagefill($image, 0, 0, $bg);
//takes (resource image, int cx, int cy, int w, int h, int color)
if ($placement == "br") {imagefilledellipse($image, 0, 0, $width, $height, $col_ellipse);}
if ($placement == "tl") {imagefilledellipse($image, $c_width, $c_height, $width, $height, $col_ellipse);}
if ($placement == "tr") {imagefilledellipse($image, 0, $c_height, $width, $height, $col_ellipse);}
if ($placement == "bl") {imagefilledellipse($image, $c_width, 0, $width, $height, $col_ellipse);}
header("Content-type: image/png");
$color_int = imagecolorallocate($image, $red, $green, $blue);
|