News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

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

Pierre-Alain Joye's Blog: Screen capture with PHP and GD

Tomas Petricek's Blog: Writing Silverlight applications in PHP

PHPClasses.org: 3D graphics in pure PHP

PHP in Action: Type hints are more useful for scalars than objects

Pádraic Brady's Blog: PHP OpenID 2.0 library for PEAR Updates


Community Events





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


package community symfony bugfix language release laravel zendserver tips voicesoftheelephpant framework install introduction opinion library api series podcast interview deployment

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