Discover, the simplest is:
Windows Under this:
PHP.INI is the one under Windows, change two places
EXTENSION_DIR = "C: / PHP4 / EXTENSIONS /"
EXTENSION = php_gd2.dll
It is enough to change these two.
Examples are:
PHP Header ("Content-Type: Image / PNG"
$ IMG_HANDLE = ImageCreate (230, 20) OR DIE ("Cannot Create Image"
$ Back_color = imagecolorallocate ($ IMG_HANDLE, 0, 10, 10
$ Txt_color = imagecolorallocate ($ IMG_HANDE, 233, 114, 191
); Imagestring ($ IMG_HANDLE, 31, 5, 5, 5, "My First Program with GD", $ TXT_COLOR
Imagespng ($ IMG_HANDLE)
);
?> php header ("Content-Type: Image / PNG"); $ Height = 300; $ Width = 300; $ IM = ImageCreate ($ Width, $ HEIGHT); $ BCK = ImageColoralLocate ($ IM, 10, 110, 100) $ White = ImageColoralLocate ($ IM, 255, 255, 255); Imagefill ($ IM, 0, 0, $ BCK); ImagelineLine ($ IM, 0, 0, $ Width, $ HEIGHT, $ White); for $ I = 0; $ I = 299; $ I = $ I 10) {Imageline ($ IM, 0, $ I, $ Width, $ HEIGHT, $ White);} ImagePNG ($ IM);?>