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 program transition. php2 with a ribbon image, call to generate multiple different graphics view_color.php
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. 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
*/
?>