// PHP-Generated Gradient Script //
// ~NoodleMan~ //
$red || $red=255;
$green || $green=255;
$blue || $blue=255;
$type || $type='v';
$width || $width=150;
$height || $height=150;
$spread || $spread=3;
$image = imagecreatetruecolor($width, $height);
$xmax=$width;
$ymax=$height;
for($x=0; $x<=$xmax; $x++)
{
$dif=abs(($width/2)-$x)*$spread;
$c1=$red-$dif;
if($c1<0) $c1=0;
$c2=$green-$dif;
if($c2<0) $c2=0;
$c3=$blue-$dif;
if($c3<0) $c3=0;
$color=imagecolorallocate($image, $c1, $c2, $c3);
for($y=0; $y<=$ymax; $y++)
{
imagefilledrectangle($image, $x, $y, $x, $y, $color);
}
}
/*
I CHANGED THE SPREAD TO 0.6, CHANGED THE RECTANGLE WITH THE ELLIPSE BELOW FOR EACH IMAGE. BROUGHT IT TO IM AND APPLIED EQUALIZE TO THE IMAGE.
1-imageellipse($image, $xmax/2, $ymax/2, $dif+$xmax/$x, $dif-$ymax/$y, $color);
2-imageellipse($image, $xmax/2, $ymax/2, $xmax-$x, $ymax-$y, $color);
3-imageellipse($image, $xmax/2, $ymax/2, $dif+$xmax/$x, $dif+$ymax/$y, $color);
4-imageellipse($image, $xmax/2, $ymax/2, $dif+$xmax/$x, $dif+$y, $color);
5-imageellipse($image, $xmax/2, $ymax/$y, $x+$xmax, 6-imageellipse($image, $xmax/2, $ymax/2, $dif/$x, $dif*$y, $color);
$y-$ymax, $color);
7-imageellipse($image, $xmax/2, $ymax/2, $x+$dif, $dif*$y, $color);
8-imageellipse($image, $xmax/2, $ymax/2, $x/$dif, $dif*$y, $color);
9-imageellipse($image, $xmax/2, $ymax/2, $x*$dif, $dif/$y, $color);
10-imageellipse($image, $ymax/2, $x*$dif, $dif*$y, $xmax/2, $color);
11-imageellipse($image, $ymax/2, $x-$dif*$y, $y-$dif*$x, $xmax/2, $color);
imageellipse($image, $ymax/2, $x+$dif*$y, $y-$dif*$x, $xmax/2, $color);
12-imageellipse($image, $xmax/2, $ymax/2+$x, $x*$dif, $x*$dif, $color);
*/
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?>