<?
// title image
header ("Content-type: image/gif");

require_once("../../drawing_functions.php");

if ($_GET["color_from"]) $from = $_GET["color_from"]; else $from = "ffffff";
if ($_GET["color_to"]) $to = $_GET["color_to"]; else $to = "f78229";
if ($_GET["width"]) $width = $_GET["width"]; else $width = "1024";

$im = imagecreatetruecolor($width, 50);
grad($im,51,$width+1,1,50,$width-1,$to,$from);


//function grad($im,$height,$width,$step,$baseheight,$basewidth,$base,$end)

	// $im is passed as @$im for the image to draw it on
	// $height is the Height of the box to draw
	// $width is the width of the box to draw
	// $step is the steps to take, a step of 10 would change the colour every 10 pixels
	// $baseheight is where to place the bottom of the rectangle
	// $basewidth is the left side of the location for the rectangle
	// $base is the start colour in hex (ffffff)
	// $end is the colour to end at in hex (000000)

imagepng($im);

?>