A. Question and answer question
1. What is the function for obtaining information about the currently installed GD library?
2. What is the function to get the image size?
3. What is the function that assigns color + alpha to an image?
4. What is the function of creating a new palette-based image?
5. What is the function of creating a new black image?
6. What is the function of rotating an image with a given angle?
7. What is the function of drawing a line of string horizontally?
8. What is the function that loads a new font?
9. What is the function to get the color index value of a pixel?
Two. Programming questions
Please draw the following picture
Answer:
A. Question and answer question
1.array gd_info ( void)
2.array getimagesize ( string $filename [, array &$ Imageinfo ])
3.int imagecolorallocatealpha ( resource $image , int $red , int $green , int $blue , int c16/>)
The first call to Imagecolorallocatealpha() fills the color palette-based image with the background color, which is the image created with the Imagecreate ()
4.Resource imagecreate ( int $x_size , int $y_size )
5.Resource imagecreatetruecolor ( int $width , int $height )
< Span class= "type" >< Span class= "Methodparam" >6. Resource imagerotate ( Resource $image , Float $angle , int $BGD _color [, int< Code class= "parameter" > $ignore _transparent = 0 ]
< Span class= "type" >7. Bool imagestring ( Resource $image , Int $font , int $x , int < Code class= "parameter" > $y , string $s , int $col )
< Span class= "type" >< Span class= "Methodparam" >< Span class= "methodname" > if font is 1,2,3,4 or 5, use the built-in font
< Span class= "type" >< Span class= "Methodparam" >< Span class= "methodname" > 8. int imageloadfont ( string $file )
9.int Imagecolorat ( resource $image , int $x , int $y )
Two. Programming questions
Figure A
<?PHP$image= Imagecreatetruecolor (200, 200);//Assign some colors$white= Imagecolorallocate ($image, 0xFF, 0xFF, 0xFF);$gray= Imagecolorallocate ($image, 0xC0, 0xC0, 0xC0);$darkgray= Imagecolorallocate ($image, 0x90, 0x90, 0x90);$navy= Imagecolorallocate ($image, 0x00, 0x00, 0x80);$darknavy= Imagecolorallocate ($image, 0x00, 0x00, 0x50);$red= Imagecolorallocate ($image, 0xFF, 0x00, 0x00);$darkred= Imagecolorallocate ($image, 0x90, 0x00, 0x00);//Create a 3D effect for($i= 110;$i> 100;$i--) {Imagefilledarc ($image, 100,$i, 100, 50, 0, 45,$darknavy,Img_arc_pie); Imagefilledarc ($image, 100,$i, 100, 50, 45, 75,$darkgray,Img_arc_pie); Imagefilledarc ($image, 100,$i, 100, 50, 75, 360,$darkred,img_arc_pie);} Imagefilledarc ($image, 100, 100, 100, 50, 0, 45,$navy,img_arc_pie); Imagefilledarc ($image, 100, 100, 100, 50, 45, 75,$gray,img_arc_pie); Imagefilledarc ($image, 100, 100, 100, 50, 75, 360,$red,img_arc_pie);//Output ImageHeader(' Content-type:image/png '); Imagepng ($image); Imagedestroy ($image);
PHP Graphics processing function questions