Home Tutorial Php Phpgd php gd background color


Share on Google+Share on Google+
php gd background color
Posted on: October 31, 2009 at 12:00 AM
This example shows you how to create background color in php gd.


header("Content-type: image/png");

$width = 350;

$height = 360;

$im = ImageCreateTrueColor($width, $height);

$red = ImageColorAllocate($im, 255, 0, 0);

ImageFillToBorder($im, 0, 0, $red, $red);




After running the program you will get the following output


Related Tags for php gd background color:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: October 31, 2009

Recommend the tutorial

Advertisements Advertisements