News Feed
Jobs Feed
Sections




News Archive
Ozh's Blog:
PHP and GD - Emulate Gradient Fill
February 14, 2006 @ 06:54:19

On Ozh's site, FrenchFragFactory.net, today, there's this handy little post dealing with the creation of gradients in PHP with the help of GD.

Here is a small PHP function I wrote that emulates a gradient fill of an image.

Disclaimer : there are probably existing alternatives or classes, maybe in PEAR. I didn't check. I wanted to write a function myself, as part of my GD training grounds.

The script is simple enough, and only uses four different variable values to make the patterns. There are a few examples of the end result in the form of a basic square output, but (as he mentions) it can be used just as easily in other situations. The source code is availible in either plain-text or in a .phps style file.

0 comments voice your opinion now!
gd graphics library emulate gradient fill gd graphics library emulate gradient fill


blog comments powered by Disqus

Similar Posts

PHPHacks.com: Creating charts with JGraph

ThinkPHP Blog: 10 years phplib - a laudation

Jim Plush's Blog: MyBic Ajax/PHP 0.6.5 Released

Web Development Blog: Create PDF documents Online with TCPDF

DeveloperTutorials.com: Create a Facebook Application With PHP


Community Events











Don't see your event here?
Let us know!


tool development interview zendframework2 community unittest series podcast code example object phpunit introduction functional framework opinion conference language release testing

All content copyright, 2013 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework