Home Tutorial Php Phpgd PHP GD Gradient Fill

 
 

Share on Google+Share on Google+
PHP GD Gradient Fill
Posted on: November 9, 2009 at 12:00 AM
Advertisement
This example shows how display gradient fill in php gd.

<?php

$image = ImageCreate(200, 200);

for($i=0; $i<255; $i++) {

$background_color = ImageColorAllocate($image, $i, $i, $i);

}

$text_color = ImageColorAllocate($image, 255, 255, 255);

$tekst = "Roseindia";

ImageString($image, 4, 30, 50, "$tekst", $text_color);

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

ImagePNG($image);

imagedestroy($image);

?>

 

After running the program you will get the following output

Advertisement

Related Tags for PHP GD Gradient Fill:


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: November 9, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com