GD Image Processing Technology
Extension=php_gd2.dll
Create a canvas
Canvas, a resource-based data, an actionable image resource
- Create canvas (New)
Imagecreate (width,height) Creating a palette-based canvas
Imagecreatetruecolor (width,height) Create a true color canvas
- Create a canvas based on a picture (open)
Imagecreatefromjpeg (URL)
Imagecreatefrompng (URL)
Imagecreatefromgif (URL)
Manipulating the canvas
Assign color: If you need to use a color on the canvas, you should assign the color to the canvas first.
(color identification) = Imagecolorallocate (img,r,g,b)
Fill Canvas
Imagefill (img,x,y, color identification)
Output canvas
1, output to picture file
2, direct output, need to tell the browser output as Picture information (header ("content-type:image/png;") )
Imagepng (Img[,url])
Imagejpeg ()
Imagegif ()
Destroying Canvas Resources
Imagedestroy (IMG)
header('content-type:image/png');$img = imagecreate(300,300);$color = imagecolorallocate($img,223,22,44);imagefill($img,3,3,$color);imagepng($img);imagedestroy();?>
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the PHP gd, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.