PLEASE RELOAD
Grad Maker



Info

This script is never accessed or changed. If you click on the PHP script you will ALWAYS get a pop-up....there is nothing to see....as this script is ONLY to talk to the server. This script does not disappear when the gradients are made and there is no limit to the number,size,color,or shape of gradients that it can produce, all at the same time. Only one script will support thousands of images.

These images are imaginary. They are not jpgs, nor gifs, nor pngs. They are created ONLY when the paged is loaded. And when the page is not in use they exist only as a series of unneeded commands....

Gradient Image

This script is accessed by its image tags in which you specify, the color, size, and shape of your gradient. These image tags are then arranged to produce gradients on pages. They may be used on the page as any other image.

In the following example three image tags are used to make the left hand column. The first is the top, the second the middle cylinder and the third the bottom. In each tag is the information for your PHP script to be able to tell the server what image to produce.

Example

Image Tag Explanation

I'm sure you've surmised by now that this image tag is going to be something different than you are accustomed to; and you would be correct although parts of it are exactly what you are accustomed to. This image tag has "variables" meaning that you change parts of it to make your gradient size, shape and colors.

These are the variables in the image tag.

This defines the angle (only two choices)
d=h OR v (horizontal) or (vertical)
(h=90 angle v=0 angle)

Size is defined here in pixels. Whichever is LESS; height or width.
h= height or length (ex. 50)

This is where you distribute the colors.
r=y OR n reflected Yes or No
(y=color 1 to color 2 to color 2 to color 1
In the above example navy to gold to navy. Creating a tube.

n=color 1 to color 2.)
This would make navy to gold only. Creating a gradangle of 90.
If you reverse the colors; n= color 2 to color 1; the colors will be gold to navy. Creating grad angle -90.

Here is your starting color in RGB
s=255,0,0

Here is you end color in RGB.
e=0,0,255

Here is what an image tag looks like.

<img src="OTF-Grad-Maker.php?d=h&h=20&r=y&s=17,17,17&e=255,215,0" width=100 height=20>

Translation
Make me a 90 gradient, 20 pixels high that is reflective with the starting color as navy and the ending color gold. This gradient will be 20 pixels high as defined and 100pixels wide.
Here's what it looks like.


Here's another tag:

<img src="OTF-Grad-Maker.php?d=v&h=40&r=y&s=17,17,17&e=255,215,00" width=20 height=40>





Here's one showing no reflective variable.


And it's opposite colors:


A vertical:



This zip file contains the php script and the example script shown here, plus a text file of the php script....

http://simplysally.com/GD/lessons/lesson10.zip

Scripts annotated by Pagemaster101

GD BasicsHome