GD Gradient Fill 1.1

This is a PHP function that emulates a gradient fill of an image
GD Gradient Fill - Gradient types outputted by this function
  1 Screenshot
It can create rectangle, ellipse, vertical, horizontal or diamond shaped gradients.

Main features:

  • Width and height : integers, dimensions of the image.
  • Direction : string, shape of the gradient.
  • Can be : vertical, horizontal, rectangle (or square), ellipse, ellipse2, circle, circle2, diamond.
  • Startcolor : string, start color in 3 or 6 digits hexadecimal.
  • Endcolor : string, end color in 3 or 6 digits hexadecimal.
  • Step : integer, optional, default to 0. Step that breaks the smooth blending effect.

last updated on:
January 26th, 2010, 3:03 GMT
license type:

Other Free / Open Source License

developed by:
Ozh Richard
operating system(s):
Windows / Linux / Mac OS / BSD / Solaris
C: \ Graphics and Multimedia \ Graphics and Animations
GD Gradient Fill
Download Button

In a hurry? Add it to your Download Basket!

user rating



Rate it!
What's New in This Release:
  • Changed : more nicely packaged as a class
  • Fixed : not displaying proper gradient colors with image dimension greater than 255 (because of a limitation in imagecolorallocate)
  • Added : optional parameter 'step', more options for 'direction'
read full changelog

Add your review!