Because php's true color table parameters can only support 256, in order to display 8 colors or more ribbons, I used the parameter transfer method. The specific implementation code is as follows: 1. Generate the transition. php & lt ;? Php ** function: generate ribbon graphics * Programmer: wlxz * Date: 2002-00-00 * Header (& quot; Content-type: image because php's true color table parameters can only support 256, in order to display 8-color or more ribbons, I used the parameter transfer method. The specific implementation code is as follows:
1. program for generating ribbon graphics
Transition. php
/*
* Function: generate a ribbon image
* Programmer: wlxz
* Date: 2002-00-00
*/
Header ("Content-type: image/Png ");
$ Im = ImageCreate (255, 50 );
$ Bgcolor = ImageColorAllocate ($ im, 0, 0, 0 );
$ X = trim ($ _ GET ['x']);
$ Y = trim ($ _ GET ['Y']);
$ Z = trim ($ _ GET ['Z']);
For ($ I = 0; I I <255; $ I ++ ){
$ Fontcol = ImageColorAllocate ($ im, $ I * $ x, $ I * $ y, $ I * $ z );
ImageLine ($ im, $ I, 0, $ I, 50, $ fontcol );
}
ImagePng ($ im );
ImageDestroy ($ im );
?>
2. call to generate multiple different images
View_color.php
/*
* Function:
* Programmer: Xiang Li
* Date: 2002-00-00
*/
?>